<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DataBatrix &#187; Web Services</title>
	<atom:link href="http://www.databatrix.com/category/web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.databatrix.com</link>
	<description>The workings of Eric Bridges</description>
	<lastBuildDate>Thu, 01 Dec 2011 23:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Populate TreeView From Custom Object Using Serializer</title>
		<link>http://www.databatrix.com/2010/12/populate-treeview-from-custom-object-using-serializer/</link>
		<comments>http://www.databatrix.com/2010/12/populate-treeview-from-custom-object-using-serializer/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 17:40:41 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Serialize]]></category>
		<category><![CDATA[TreeView]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/?p=321</guid>
		<description><![CDATA[From time to time I need to spit out the public properties of an object for various reasons.  A typical use would be to show user friendly results from a web service that returns a complex object.  There could be tons of other uses!  After doing this a few times, I finially decided to post [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I need to spit out the public properties of an object for various reasons.  A typical use would be to show user friendly results from a web service that returns a complex object.  There could be tons of other uses!  After doing this a few times, I finially decided to post this so I can always reference it.  Anytime I do any recursive methods, it always takes me a couple of tweaks before getting it right.</p>
<p>The idea is that I have a custom object that I need to spin through to populate a <span style="color: #0000ff;">TreeView</span>.  I created a couple of simple methods to do such.  I though about using <span style="color: #0000ff;">Reflection</span>, but my method starting getting larger and larger because I was having to put in special code to handle certain Types (i.e. <span style="color: #0000ff;">String</span>, <span style="color: #0000ff;">ICollection</span>, etc).  Since my typical Use Case was to spit out the results of a complex object returned from a ASMX or WCF service, I decided to go the Serialize route.  My DTO class was typically already decorated with the [<span style="color: #008080;">Serializable</span>] attribute, if not, it was simple enought to add.</p>
<p>So first we serialize the object into a string of XML, then stuff that into a XmlDocument.  Then you can loop through the elements while creating each <span style="color: #0000ff;">TreeViewNode</span>.  That&#8217;s it!</p>
<pre class="brush:csharp">        public void PopulateTreeView(object obj, TreeView tv)
        {
            System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(obj.GetType());
            System.Text.StringBuilder sb = new System.Text.StringBuilder();  // StringBuilder to hold the XML
            using (System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(sb))
            {
                serializer.Serialize(writer, obj); // Serialize the object to XML
                System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();
                xDoc.LoadXml(sb.ToString());  // Shove it in a XmlDocument
                tv.Nodes.Add(PopulateNode(xDoc));  // Add the Nodes to the TreeView
            }
        }

        public TreeNode PopulateNode(System.Xml.XmlNode node)
        {
            TreeNode treenode = new TreeNode(node.Name);  // Add the Name to the Node
            if (node.ChildNodes.Count == 1) //Prevents ParentNode from displaying all of the InnerText
                treenode.Text += "=" + node.InnerText; // If only 1 ChildNode then add the InnerText

            for (int i = 0; i &lt; node.ChildNodes.Count; i++)
            {
                if (node.ChildNodes[i].HasChildNodes)
                {
                    treenode.ChildNodes.Add(PopulateNode(node.ChildNodes[i]));
                }
            }
            return treenode;
        }</pre>
<p>Then call the method to populate where &#8220;customObject&#8221; is the object you want displayed in your TreeView:</p>
<pre class="brush:csharp">            PopulateTreeView(customObject, TreeView1);</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2010/12/populate-treeview-from-custom-object-using-serializer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A .NET Bit.ly API Helper Class (Visual Basic.NET)</title>
		<link>http://www.databatrix.com/2009/08/a-net-bit-ly-api-helper-class-visual-basic-net/</link>
		<comments>http://www.databatrix.com/2009/08/a-net-bit-ly-api-helper-class-visual-basic-net/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 21:19:19 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[bit.ly]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/?p=162</guid>
		<description><![CDATA[I decided to write a helper class for using the Bit.ly API for creating short urls.  You know, those tiny links that you see all over Facebook, Twitter, etc.  The snippet below shows how you would use the helper class.  Not only can you shorten an url, you can shorted multiple urls in a single [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to write a helper class for using the Bit.ly API for creating short urls.  You know, those tiny links that you see all over Facebook, Twitter, etc.  The snippet below shows how you would use the helper class.  Not only can you shorten an url, you can shorted multiple urls in a single call as well as get stats and info about a bit.ly url.  If you are looking to incorporate bit.ly short urls in your application using their API access, this will save you some time.  The class uses the XmlSerializer for reading bit.ly&#8217;s response.</p>
<pre class="brush: vb">        ' Pass username and API key to instantiate
        Dim newbitlyAPI As New DataBatrix.bitlyAPI.bitlyAPI("bitlyapidemo", "R_0da49e0a9118ff35f52f629d2d71bf07")

        ' Sample of creating 1 short URL
        Dim shortenResponse As DataBatrix.bitlyAPI.bitlyShortenResponse = newbitlyAPI.Shorten("http://www.databatrix.com")
        Dim shortURL As String = ""
        If shortenResponse.results.Count &gt; 0 Then
            shortURL = shortenResponse.results(0).shortUrl
        End If

        ' Sample of creating multiple short URLs
        Dim longUrls() As String = {"http://www.databatrix.com", "http://www.google.com"}
        Dim shortenResponses As DataBatrix.bitlyAPI.bitlyShortenResponse = newbitlyAPI.Shorten(longUrls)
        Dim shortURLs(1) As String
        For i As Integer = 0 To shortenResponses.results.Count - 1
            shortURLs(i) = shortenResponses.results(i).shortUrl

        Next

        ' Sample of getting bit.ly info...
        Dim info As DataBatrix.bitlyAPI.bitlyInfoResponse = newbitlyAPI.Info("2bYgqR")

        ' Sample of getting bit.ly stats...
        Dim stats As DataBatrix.bitlyAPI.bitlyStatsResponse = newbitlyAPI.Stats("http://bit.ly/1RmnUT")</pre>
<p>Below is the helper class that I created.  You can download the VB file <a href="http://www.databatrix.com/wp-content/uploads/2009/08/bitlyAPI.vb">bitlyAPI.vb</a> or a sample project <a href="http://www.databatrix.com/wp-content/uploads/2009/08/TestBitly.zip">TestBitly Project Files</a>.</p>
<pre class="brush: vb">Imports System.Web
Imports System.Xml
Imports System.Xml.Serialization

Namespace DataBatrix.bitlyAPI
    Public Class bitlyAPI
        Const BaseAPIUrl As String = "http://api.bit.ly/"
        Const version As String = "2.0.1"
        Const format As String = "xml"

        Public login As String = String.Empty
        Public apiKey As String = String.Empty

        Sub New(ByVal login As String, ByVal apiKey As String)
            Me.login = login
            Me.apiKey = apiKey

        End Sub

        Private Function BuildBaseRequestURL(ByVal applicationName As String) As System.Text.StringBuilder
            Dim RequestUrl As New System.Text.StringBuilder()
            With RequestUrl
                .Append(BaseAPIUrl &amp; HttpUtility.UrlEncode(applicationName) &amp; "?")
                .Append("version=" &amp; HttpUtility.UrlEncode(version) &amp; "&amp;")
                .Append("format=" &amp; HttpUtility.UrlEncode(format) &amp; "&amp;")
                .Append("login=" &amp; HttpUtility.UrlEncode(login) &amp; "&amp;")
                .Append("apiKey=" &amp; HttpUtility.UrlEncode(apiKey) &amp; "&amp;")
            End With
            Return RequestUrl
        End Function

        Public Function Shorten(ByVal longUrl As String) As bitlyShortenResponse
            Dim logUrls() As String = {longUrl}
            Return Shorten(logUrls)
        End Function

        Public Function Shorten(ByVal longUrl() As String) As bitlyShortenResponse
            Dim RequestUrl As System.Text.StringBuilder = BuildBaseRequestURL("shorten")
            For Each s As String In longUrl
                RequestUrl.Append("&amp;longUrl=" &amp; HttpUtility.UrlEncode(s))

            Next
            Dim responseObj As DataBatrix.bitlyAPI.bitlyShortenResponse = Nothing
            Try
                Dim serializer = New XmlSerializer(GetType(DataBatrix.bitlyAPI.bitlyShortenResponse))
                Using reader As XmlTextReader = New XmlTextReader(RequestUrl.ToString())
                    responseObj = CType(serializer.Deserialize(reader), DataBatrix.bitlyAPI.bitlyShortenResponse)
                End Using

            Catch ex As Exception

            End Try

            If responseObj.errorCode &gt; 0 Then
                Throw New ApplicationException("Error from bit.ly: " &amp; responseObj.errorMessage)
            End If
            Return responseObj
        End Function
        Public Function Info(ByVal hash As String) As bitlyInfoResponse
            Dim RequestUrl As System.Text.StringBuilder = BuildBaseRequestURL("info")
            With RequestUrl
                .Append("hash=" &amp; HttpUtility.UrlEncode(hash))
            End With

            Dim responseObj As DataBatrix.bitlyAPI.bitlyInfoResponse = Nothing
            Try
                Dim serializer = New XmlSerializer(GetType(DataBatrix.bitlyAPI.bitlyInfoResponse))
                Using reader As XmlTextReader = New XmlTextReader(RequestUrl.ToString())
                    responseObj = CType(serializer.Deserialize(reader), DataBatrix.bitlyAPI.bitlyInfoResponse)
                End Using

            Catch ex As Exception
                Throw New ApplicationException("API Error: " &amp; ex.Message)
            End Try
            If responseObj.errorCode &gt; 0 Then
                Throw New ApplicationException("Error from bit.ly: " &amp; responseObj.errorMessage)
            End If
            Return responseObj
        End Function

        Public Function Stats(ByVal shortUrl As String) As bitlyStatsResponse
            Dim RequestUrl As System.Text.StringBuilder = BuildBaseRequestURL("stats")
            With RequestUrl
                .Append("shortUrl=" &amp; HttpUtility.UrlEncode(shortUrl))

            End With

            Dim responseObj As DataBatrix.bitlyAPI.bitlyStatsResponse = Nothing
            Try
                Dim serializer = New XmlSerializer(GetType(DataBatrix.bitlyAPI.bitlyStatsResponse))
                Using reader As XmlTextReader = New XmlTextReader(RequestUrl.ToString())
                    responseObj = CType(serializer.Deserialize(reader), DataBatrix.bitlyAPI.bitlyStatsResponse)
                End Using

            Catch ex As Exception
                Throw New ApplicationException("API Error: " &amp; ex.Message)
            End Try
            If responseObj.errorCode &gt; 0 Then
                Throw New ApplicationException("Error from bit.ly: " &amp; responseObj.errorMessage)
            End If
            Return responseObj
        End Function

    End Class

    Public MustInherit Class bitlyResponseBase
        &lt;Xml.Serialization.XmlElement("errorCode")&gt; _
        Public errorCode As Integer = 0

        &lt;Xml.Serialization.XmlElement("errorMessage")&gt; _
        Public errorMessage As String = String.Empty

        &lt;Xml.Serialization.XmlElement("statusCode")&gt; _
        Public statusCode As String = String.Empty

    End Class

    &lt;System.Serializable(), Xml.Serialization.XmlRoot("bitly")&gt; _
    Public Class bitlyShortenResponse
        Inherits bitlyResponseBase

        &lt;Xml.Serialization.XmlArray("results"), Xml.Serialization.XmlArrayItem("nodeKeyVal")&gt; _
        Public results As New List(Of KeyVal)

        Public Class KeyVal
            &lt;Xml.Serialization.XmlElement("userHash")&gt; _
             Public userHash As String

            &lt;Xml.Serialization.XmlElement("shortKeywordUrl")&gt; _
             Public shortKeywordUrl As String

            &lt;Xml.Serialization.XmlElement("hash")&gt; _
             Public hash As String

            &lt;Xml.Serialization.XmlElement("nodeKey")&gt; _
             Public longUrl As String

            &lt;Xml.Serialization.XmlElement("shortUrl")&gt; _
             Public shortUrl As String

        End Class
    End Class

    &lt;System.Serializable(), Xml.Serialization.XmlRoot("bitly")&gt; _
    Public Class bitlyInfoResponse
        Inherits bitlyResponseBase

        &lt;Xml.Serialization.XmlArray("results"), Xml.Serialization.XmlArrayItem("doc")&gt; _
        Public results As New List(Of bitlyInfoResultItem)

        Public Class bitlyInfoResultItem
            &lt;Xml.Serialization.XmlElement("shortenedByUser")&gt; _
            Public shortenedByUser As String
            &lt;Xml.Serialization.XmlElement("keywords")&gt; _
            Public keywords As String
            &lt;Xml.Serialization.XmlElement("hash")&gt; _
            Public hash As String
            &lt;Xml.Serialization.XmlElement("exif")&gt; _
            Public exif As String
            &lt;Xml.Serialization.XmlElement("surbl")&gt; _
            Public surbl As String
            &lt;Xml.Serialization.XmlElement("contentLength")&gt; _
            Public contentLength As String
            &lt;Xml.Serialization.XmlElement("id3")&gt; _
            Public id3 As String
            &lt;Xml.Serialization.XmlElement("calais")&gt; _
            Public calais As String
            &lt;Xml.Serialization.XmlElement("longUrl")&gt; _
            Public longUrl As String
            &lt;Xml.Serialization.XmlElement("version")&gt; _
            Public version As String
            &lt;Xml.Serialization.XmlElement("htmlMetaDescription")&gt; _
            Public htmlMetaDescription As String
            &lt;Xml.Serialization.XmlElement("htmlMetaKeywords")&gt; _
            Public htmlMetaKeywords As String
            &lt;Xml.Serialization.XmlElement("calaisId")&gt; _
            Public calaisId As String
            &lt;Xml.Serialization.XmlElement("thumbnail")&gt; _
            Public thumbnail As thumbnailObj
            &lt;Xml.Serialization.XmlElement("contentType")&gt; _
            Public contentType As String
            &lt;Xml.Serialization.XmlArray("users"), Xml.Serialization.XmlArrayItem("item")&gt; _
            Public users As List(Of String)
            &lt;Xml.Serialization.XmlElement("globalHash")&gt; _
            Public globalHash As String
            &lt;Xml.Serialization.XmlElement("htmlTitle")&gt; _
            Public htmlTitle As String
            &lt;Xml.Serialization.XmlElement("metacarta")&gt; _
            Public metacarta As String
            &lt;Xml.Serialization.XmlElement("mirrorUrl")&gt; _
            Public mirrorUrl As String
            &lt;Xml.Serialization.XmlElement("keyword")&gt; _
            Public keyword As String
            &lt;Xml.Serialization.XmlElement("calaisResolutions")&gt; _
            Public calaisResolutions As String
            &lt;Xml.Serialization.XmlElement("userHash")&gt; _
            Public userHash As String

            Public Class thumbnailObj
                &lt;Xml.Serialization.XmlElement("large")&gt; _
                Public large As String
                &lt;Xml.Serialization.XmlElement("small")&gt; _
                Public small As String
                &lt;Xml.Serialization.XmlElement("medium")&gt; _
                Public medium As String
            End Class

        End Class
    End Class

    &lt;System.Serializable(), Xml.Serialization.XmlRoot("bitly")&gt; _
Public Class bitlyStatsResponse
        Inherits bitlyResponseBase

        &lt;Xml.Serialization.XmlElement("hash")&gt; _
        Public hash As String
        &lt;Xml.Serialization.XmlElement("clicks")&gt; _
        Public clicks As String

        Public Class bitlyStatsResultItem
            &lt;Xml.Serialization.XmlElement("None")&gt; _
            Public None As String
            &lt;Xml.Serialization.XmlElement("direct")&gt; _
            Public direct As String
            &lt;Xml.Serialization.XmlArray("nodeKeyVal"), XmlArrayItem("nodeKeyVal")&gt; _
            Public nodeKeyValue As List(Of KeyValue)
            &lt;Xml.Serialization.XmlElement("nodeKey")&gt; _
            Public nodeKey As String

            Public Class KeyValue
                &lt;Xml.Serialization.XmlElement("nodeValue")&gt; _
            Public nodeValue As String
                &lt;Xml.Serialization.XmlElement("nodeKey")&gt; _
                Public nodeKey As String
            End Class
        End Class
    End Class

End Namespace</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/a-net-bit-ly-api-helper-class-visual-basic-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E-manage Mobile Portal</title>
		<link>http://www.databatrix.com/2009/08/e-manage-mobile-portal/</link>
		<comments>http://www.databatrix.com/2009/08/e-manage-mobile-portal/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 15:17:46 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/e-manage-mobile-portal/</guid>
		<description><![CDATA[Background: E-manage is a business management application.  It is capable of managing customer databases (CRM) as well as projects, invoices, purchase orders, and inventory to name a few.  The e-manage client application runs on a users desktop and uses Microsoft .NET as foundation along with a Microsoft SQL Server as the back-end. Problem: Getting information [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>E-manage is a business management application.  It is capable of managing customer databases (CRM) as well as projects, invoices, purchase orders, and inventory to name a few.  The e-manage client application runs on a users desktop and uses Microsoft .NET as foundation along with a Microsoft SQL Server as the back-end.</p>
<h3>Problem:</h3>
<p>Getting information was easy when you were in the office at a computer.  However, you were out of luck when you were out of the office.  Something was needed to allow users access to crucial business data while mobile.</p>
<h3>Solution:</h3>
<p>I was asked to created a mobile web portal that could be used with any smart phone that had a basic Internet connection.  This would allow users to access company data while out of the office.</p>
<h3>Result:</h3>
<table border="0">
<tbody>
<tr>
<td>
<p><div id="attachment_181" class="wp-caption alignnone" style="width: 160px"><a href="http://www.databatrix.com/wp-content/uploads/2009/08/em_main.JPG"><img class="size-thumbnail wp-image-181" title="Mobile_Main_Screen" src="http://www.databatrix.com/wp-content/uploads/2009/08/em_main-150x150.jpg" alt="Mobile portal landing screen with alerts and recent items." width="150" height="150" /></a><p class="wp-caption-text">Mobile portal landing screen with alerts and recent items.</p></div></td>
<td>
<p><div id="attachment_180" class="wp-caption alignnone" style="width: 160px"><a href="http://www.databatrix.com/wp-content/uploads/2009/08/em_company.JPG"><img class="size-thumbnail wp-image-180" title="Mobile_Company_View" src="http://www.databatrix.com/wp-content/uploads/2009/08/em_company-150x150.jpg" alt="Mobile portal company view" width="150" height="150" /></a><p class="wp-caption-text">Mobile portal company view</p></div></td>
</tr>
<tr>
<td>
<p><div id="attachment_183" class="wp-caption alignnone" style="width: 160px"><a href="http://www.databatrix.com/wp-content/uploads/2009/08/em_ServiceTicket.JPG"><img class="size-thumbnail wp-image-183" title="Mobile Service Ticket" src="http://www.databatrix.com/wp-content/uploads/2009/08/em_ServiceTicket-150x150.jpg" alt="View/Edit/Create Service Tickets" width="150" height="150" /></a><p class="wp-caption-text">View/Edit/Create Service Tickets</p></div></td>
<td>
<p><div id="attachment_182" class="wp-caption alignnone" style="width: 160px"><a href="http://www.databatrix.com/wp-content/uploads/2009/08/em_projects.JPG"><img class="size-thumbnail wp-image-182" title="Mobile Projects View" src="http://www.databatrix.com/wp-content/uploads/2009/08/em_projects-150x150.jpg" alt="View/Edit Projects" width="150" height="150" /></a><p class="wp-caption-text">View/Edit Projects</p></div></td>
</tr>
</tbody>
</table>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/eManage_Mobile_Portal_Create_Service_Ticket.wmv">e-manage Mobile Portal &#8211; Create Service Ticket</a> (Video)</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/eManage_Mobile_Portal_Add_New_Company.wmv">e-manage Mobile Portal &#8211; Add New Company</a> (Video)</p>
<p>I created a web application written in VB.NET that would connect directly with the MS SQL Server to supply the user with the data they needed.  I created it to be light as possible without giving up functionality and usability.  I also integrated with Yahoo Business Search API to lookup business addresses automatically to increase accuracy.  From the mobile portal, you can:</p>
<ul>
<li>View/Edit/Create a Company or Location</li>
<li>Create a Company with the aid of a Yahoo search</li>
<li>View/Edit/Create a Contact</li>
<li>Assign existing Company Contacts to a Project</li>
<li>View/Edit/Create a Project</li>
<li>View/Edit/Create a Service Agreement</li>
<li>View Service Ticket part totals when viewing a Service Agreement</li>
<li>Easily see a service agreement&#8217;s validity based on the agreement&#8217;s start date and agreement contact length</li>
<li>View/Edit/Create a Service Ticket</li>
<li>Assign/Re-Assign Service Tickets to Service Agreements</li>
<li>Add Parts to a Service Ticket by Searching the e-manage part database</li>
<li>View Part totals for a Service Ticket</li>
<li>View/Download a document/attachment that belongs to a Company, Contact, Project, Service Agreement, or Service Ticket</li>
<li>View/Create a Note that belongs to a Company, Contact, Project, Service Agreement, or Service Ticket</li>
<li>View/Reply/Acknowledge a Note that belongs to any object</li>
<li>Submit Project Action Items</li>
<li>View your Actions To Perform</li>
<li>View your Open Action Items</li>
<li>View Recent Items (syncs with the Recent Items in e-manage and updates any items that you open via the mobile portal)</li>
<li>Open multiple items at the same time in a tabbed environment</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/e-manage-mobile-portal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.databatrix.com/wp-content/uploads/2009/08/eManage_Mobile_Portal_Create_Service_Ticket.wmv" length="3940379" type="video/x-ms-wmv" />
<enclosure url="http://www.databatrix.com/wp-content/uploads/2009/08/eManage_Mobile_Portal_Add_New_Company.wmv" length="2566817" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>eManage Search for Blackberry</title>
		<link>http://www.databatrix.com/2009/08/emanage-search-for-blackberry/</link>
		<comments>http://www.databatrix.com/2009/08/emanage-search-for-blackberry/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:42:18 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Blackberry Enterprise Server]]></category>
		<category><![CDATA[Blackberry MDS Runtime]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/emanage-search-for-blackberry/</guid>
		<description><![CDATA[Background: Our CRM software contains a huge list of contacts that are only available from within the software application. Problem: It becomes a challenge when a sales team member is out of the office (on the road) and needs a customer&#8217;s phone number or email address.&#160; It is typically not feasible to boot up their [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>Our CRM software contains a huge list of contacts that are only available from within the software application.</p>
<h3>Problem:</h3>
<p>It becomes a challenge when a sales team member is out of the office (on the road) and needs a customer&#8217;s phone number or email address.&#160; It is typically not feasible to boot up their laptop, connect to the Internet and lookup the contact.</p>
<h3>Solution:</h3>
<p>The solution was to create a simple Blackberry application that will allow the team member the ability to lookup a contact against our CRM software&#8217;s database.&#160; From their Blackberry, they would then be able to call any of the listed phone numbers for the contact or send them an email.</p>
<h3>Result:</h3>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen02.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HomeScreen-02" border="0" alt="HomeScreen-02" src="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen02_thumb.png" width="260" height="200" /></a> <a href="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen03.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HomeScreen-03" border="0" alt="HomeScreen-03" src="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen03_thumb.png" width="260" height="200" /></a> <a href="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen04_e.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HomeScreen-04_e" border="0" alt="HomeScreen-04_e" src="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen04_e_thumb.png" width="260" height="200" /></a> <a href="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen05.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HomeScreen-05" border="0" alt="HomeScreen-05" src="http://www.databatrix.com/wp-content/uploads/2009/08/HomeScreen05_thumb.png" width="260" height="200" /></a> </p>
<p>I created a small Blackberry application designed using the <a href="http://na.blackberry.com/eng/developers/rapidappdev/vsplugin.jsp">Blackberry Plug-in for Microsoft Visual Studio</a>.&#160; The applications allows the user to search by name or company (or both).&#160; The application then submits the search request to the Blackberry Enterprise Server, which then uses a web service that I created to search against our CRM database which is a SQL Server 2005 database.    <br />Once the results are returned, you then have the ability to call any of the listed numbers, email, or add them to your Blackberry address book (which will in turn add them to your Outlook address book).    <br />Overall basic program, but can be a lifesaver when out of the office.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/emanage-search-for-blackberry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desktop Loader</title>
		<link>http://www.databatrix.com/2009/08/desktop-loader/</link>
		<comments>http://www.databatrix.com/2009/08/desktop-loader/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:34:36 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/desktop-loader/</guid>
		<description><![CDATA[Background: As new updates or new applications come to light, they need to be installed on everyone&#8217;s machine in the company. Problem: It becomes a challenge to automatically install applications on everyone&#8217;s machine.&#160; At the time this was typically done using &#34;Logon Scripts&#34; that fire off after you log in.&#160; However, this would only work [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>As new updates or new applications come to light, they need to be installed on everyone&#8217;s machine in the company.</p>
<h3>Problem:</h3>
<p>It becomes a challenge to automatically install applications on everyone&#8217;s machine.&#160; At the time this was typically done using &quot;Logon Scripts&quot; that fire off after you log in.&#160; However, this would only work if the user was already on the network (not at home).</p>
<h3>Solution:</h3>
<p>The solution was to develop a small desktop application that would run at startup.&#160; The application would check to see if there was anything that needed to be installed, install them, and finally close.&#160; The application also needed to work in or out of the office.</p>
<h3>Result:</h3>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/ApplicationLoader1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ApplicationLoader1" border="0" alt="ApplicationLoader1" src="http://www.databatrix.com/wp-content/uploads/2009/08/ApplicationLoader1_thumb.png" width="260" height="177" /></a>Fig. 1</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/ApplicationLoader2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ApplicationLoader2" border="0" alt="ApplicationLoader2" src="http://www.databatrix.com/wp-content/uploads/2009/08/ApplicationLoader2_thumb.png" width="260" height="176" /></a>Fig. 2&#160; </p>
<p>I created a small VB.NET desktop application that would run at startup hidden, or you could run the GUI (viewable) version by launching the application from the Start&gt;Programs.&#160; Since it needed to run in and out of the office, it uses a web service to check to see what updates are needed.&#160; How does it know which ones are needed?&#160; After the program installs the application it uses the web service to update a log that notes the application, logged in user name, and machine name.&#160; This was a application can be installed per machine AND user instead of just one or the other.&#160; If an application is needed, the web service sends back the folder name on a secure FTP site that contains all of the files that need to be copied to the local machine.&#160; It also passes the executable file name to run once it has finished copying the files.&#160; Applications that need to be installed can be assigned to certain users, groups, machines, or everyone.&#160; Also they can be flagged as &quot;optional&quot;.&#160; Optional applications are not automatically installed via the hidden startup application and can only be install by manually kicking off the installation from the GUI version shown in Fig. 2.&#160; Another feature is the application has the ability to update itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/desktop-loader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desktop Tools</title>
		<link>http://www.databatrix.com/2009/08/desktop-tools/</link>
		<comments>http://www.databatrix.com/2009/08/desktop-tools/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 23:51:09 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[Desktop Applications]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/desktop-tools/</guid>
		<description><![CDATA[Background: I created a single page web page that was set as the background using the Active Desktop function of Windows XP.&#160; This web page allowed you to search the employee database for phone numbers or extensions.&#160; It also had a section to calculate shipping for certain items my company sells. Problem: Active Desktop started [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>I created a single page web page that was set as the background using the Active Desktop function of Windows XP.&#160; This web page allowed you to search the employee database for phone numbers or extensions.&#160; It also had a section to calculate shipping for certain items my company sells.</p>
<h3>Problem:</h3>
<p>Active Desktop started messing up when laptop users would boot without a internet connection present.&#160; Also, since the web page was hosted on the company Intranet, a login dialog box would pop-up if IE was not configured properly which was confusing to some users.</p>
<h3>Solution:</h3>
<p>Rebuild the web page to not use Active Desktop, but still have the tools easily accessible.&#160; Having a bookmark to the web page was not considered &quot;easily accessible&quot;.</p>
<h3>Result:</h3>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tools1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Desktop_Tools1" border="0" alt="Desktop_Tools1" src="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tools1_thumb.png" width="260" height="179" /></a> Fig. 1</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tools2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Desktop_Tools2" border="0" alt="Desktop_Tools2" src="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tools2_thumb.png" width="260" height="196" /></a>Fig. 2</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tools3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Desktop_Tools3" border="0" alt="Desktop_Tools3" src="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tools3_thumb.png" width="235" height="260" /></a>&#160; Fig. 3</p>
<p>I decided to created a small application that runs in the system tray.&#160; Right-clicking the icon in the tray would expand a menu of available tools.&#160; Fig. 1 shows the menu and the employee search box that appears after clicking &quot;People Finder&quot;.&#160; Certain menu items are shown/hidden depending on the user&#8217;s login.&#160; For example, my login shows 6 items, but &quot;Support Ticket&quot; and &quot;Cams&quot; are not show for others.&#160; Rights are stored in the SQL database and not in the application so allowing access is simple and does not require an application update.&#160; Since we are on the subject of databases&#8230;how should the application connect to it?&#160; I decided to not connect directly to the database since the user would have to be on the network or have their VPN connected, but instead indirectly by using web services.&#160; Using web services allowed the application to work as long as any Internet connection was present.&#160; If a connection was not present, the application hides menu items that require a connection or certain rights.&#160; I created a separate web site that hosted the web service application that basically would act as a proxy for my application.   <br />Since I knew I would be updating the application as time went by, I wanted the application to be able to update itself.&#160; I accomplished this by using some of the &quot;Click Once&quot; features of Visual Studio.&#160; Instead of using the default settings, I handled the Click Once part programmatically so that I could force the update.    <br /><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tool1.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Desktop_Tool1" border="0" alt="Desktop_Tool1" align="left" src="http://www.databatrix.com/wp-content/uploads/2009/08/Desktop_Tool1_thumb.jpg" width="260" height="213" /></a> I added a &quot;Sales Links&quot; item that expands into a limitless list of links and sub-links.&#160; The links can be&#160; URLs, local folders, or anything that you can type into the Start&gt;Run box!&#160; Users with permission can easily modify and add links.&#160; The application refreshes the links from the database every 30 minutes.    <br />Lets talk security&#8230;    <br />Since only a standard Internet connection is needed for the application to work, there were a couple of security concerns.&#160; The web service application was open to the public!&#160; That&#8217;s okay, lots of web service applications are open to the public&#8230;that&#8217;s kind of the point of them.&#160; I decided to use &quot;keys&quot; that had to be passed each time the application consumed a web service.&#160; In other words, a password (or key) is passed to the web service and every method (function) the web service has requires a password.&#160; What about updates?&#160; The application needs to look in a public place for updates.&#160; If its public then everyone could download the program.&#160; That&#8217;s okay too!&#160; I just had to put some security measures in place with the application is launched.&#160; Let&#8217;s just say that when the program starts it knows if it is suppose to be on that computer, if the check fails the application quits.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/desktop-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Conversion Application</title>
		<link>http://www.databatrix.com/2009/08/custom-conversion-application/</link>
		<comments>http://www.databatrix.com/2009/08/custom-conversion-application/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 23:39:18 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Desktop Applications]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/custom-conversion-application/</guid>
		<description><![CDATA[Background: One of the many things my company does is file room conversions.&#160; To make this short and sweet, a file folder may need to be moved to a new location.&#160; In the process the folder may need a new label applied to the folder.&#160; This is simplistic example of a conversion.&#160; A client requested [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>One of the many things my company does is file room conversions.&#160; To make this short and sweet, a file folder may need to be moved to a new location.&#160; In the process the folder may need a new label applied to the folder.&#160; This is simplistic example of a conversion.&#160; A client requested this type of service from us.</p>
<h3>Problem:</h3>
<p>This was a large conversion and the client required several specific &quot;checks&quot; to be in place.&#160;&#160; The original folder needed to be scanned by a barcode reader to rule out data entry errors.&#160; The barcode data would then need to be sent to the client so that other various information could be added.&#160; The data would then need to come back to us so that we could print new labels.&#160; Since this was a daily process for approximately 3 months, some tracking was needed so that at any given time a folder could be found.</p>
<h3>Solution:</h3>
<p>I was to create several applications to aid in the conversion process.&#160; Starting with one to handle the barcode scanning in the first stage.&#160; Next a secure web site needed to be created to allow files to be received from scanning, downloaded by the client, and re-uploaded.</p>
<h3>Result:</h3>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Conversion1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Conversion1" border="0" alt="Conversion1" src="http://www.databatrix.com/wp-content/uploads/2009/08/Conversion1_thumb.png" width="260" height="212" /></a> Fig. 1</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Conversion2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Conversion2" border="0" alt="Conversion2" src="http://www.databatrix.com/wp-content/uploads/2009/08/Conversion2_thumb.png" width="210" height="260" /></a>Fig. 2</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Conversion3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Conversion3" border="0" alt="Conversion3" src="http://www.databatrix.com/wp-content/uploads/2009/08/Conversion3_thumb.png" width="260" height="137" /></a>Fig. 3&#160; </p>
<p>I created 2 desktop applications and 1 web application that included a web service.&#160; The first desktop application was installed on laptop with barcode scanners attached.&#160; This application would be used to gather file label barcode.&#160; Fig. 1 show the screen of the laptop with the application running.&#160; The screen provided various information and also included visual and audible verification of scanned barcodes.&#160; Because of the barcode situation on the folders, the application needed to check to make sure the barcode was in fact valid.&#160; <br />I provided 2 different way to get the scanned data back to the main office.&#160; One way was by using a web site upload utility.&#160; The other way was to have the barcode scanning application automatically send the file via a web service that I created.&#160; Either way, the file was placed in the same folder back at the main office.&#160; This folder was being watched my another desktop application that I made that ran on a separate machine.&#160; Once a file was uploaded, the desktop application would grab the file, import all of the data into a SQL Server, and post the file on the secure web site where the client could download the file.&#160; The client would add various information to the data and re-upload it via the web site.&#160; Date and time stamps were noted of all of the transactions.&#160; The re-uploaded file was placed in a different folder that was also watched by the desktop application.&#160; Once this file was uploaded, it was checked for certain required data, checked for the correct sort order, imported into the SQL Server, and marked as &quot;OK&quot; so the client would know that everything was good.    <br />Up until now, everything was automated and only required routine checkups to make sure everything was okay.&#160; The last step was to print out the labels (sample shown in Fig. 2).&#160; The step to print the labels was simplified into dragging and dropping the file that was re-uploaded from the client into a separate watched folder.&#160; Once the file was dropped there, it was sorted into a special sort order since their sheets were later to be cut into single labels.&#160; Then a cover sheet was printed followed by the label print job.&#160; After the labels are sent to the printer the printed date and time is noted in the database and viewable from the web site.    <br />Fig. 3 show the landing page of the web site application which allows access to several tools and lookups.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/custom-conversion-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

