<?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; Desktop Applications</title>
	<atom:link href="http://www.databatrix.com/category/projects/desktop-applications/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>Automatic Email Alerts From Any SQL Query</title>
		<link>http://www.databatrix.com/2009/09/automatic-email-alerts-from-any-sql-query/</link>
		<comments>http://www.databatrix.com/2009/09/automatic-email-alerts-from-any-sql-query/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 13:24:40 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[Desktop Applications]]></category>
		<category><![CDATA[MS SQL]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/?p=188</guid>
		<description><![CDATA[Problem Reminder emails were needed to be sent out to remind sales staff to follow up on projects. Solution I developed a simple command line executable that takes 1 parameter which is an XML file.  The contents of the XML file would look something like: &#60;?xml version="1.0" encoding="utf-8" ?&#62; &#60;Settings&#62; &#60;ErrorEmail&#62; &#60;Email&#62;email@gmail.com&#60;/Email&#62; &#60;/ErrorEmail&#62; &#60;SummaryEmail&#62; &#60;Email&#62;email@gmail.com&#60;/Email&#62; [...]]]></description>
			<content:encoded><![CDATA[<h3>Problem</h3>
<p>Reminder emails were needed to be sent out to remind sales staff to follow up on projects.</p>
<h3>Solution</h3>
<p>I developed a simple command line executable that takes 1 parameter which is an XML file.  The contents of the XML file would look something like:</p>
<pre class="brush: xml">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;Settings&gt;
	&lt;ErrorEmail&gt;
		&lt;Email&gt;email@gmail.com&lt;/Email&gt;
	&lt;/ErrorEmail&gt;
	&lt;SummaryEmail&gt;
		&lt;Email&gt;email@gmail.com&lt;/Email&gt;
	&lt;/SummaryEmail&gt;
	&lt;Query&gt;
		SELECT * FROM Projects
		WHERE Cancelled = 0 And Completed = 0 AND BookDate IS NULL
		AND FollowUpBy &lt;= getdate()
	&lt;/Query&gt;
	&lt;SQLConnectionString&gt;Server=SQLServer;Database=MainDatabase;Persist Security Info=True;Integrated Security=true&lt;/SQLConnectionString&gt;
	&lt;TemplateEmailFileName&gt;EmailTemplate.txt&lt;/TemplateEmailFileName&gt;
	&lt;EmailSubject&gt;Alert Email For Project#&lt;:ProjectID:&gt;&lt;/EmailSubject&gt;
	&lt;EmailDomain&gt;mycompany.com&lt;/EmailDomain&gt;
	&lt;ToAddressDatabaseField&gt;Salesperson&lt;/ToAddressDatabaseField&gt;
	&lt;ToAddressFieldIsEmail&gt;0&lt;/ToAddressFieldIsEmail&gt;
	&lt;SMTPSettings&gt;
		&lt;SMTPServer&gt;smtp.gmail.com&lt;/SMTPServer&gt;
		&lt;EnableSSL&gt;1&lt;/EnableSSL&gt;
		&lt;RequiresAuthentication&gt;1&lt;/RequiresAuthentication&gt;
		&lt;Username&gt;email@gmail.com&lt;/Username&gt;
		&lt;Password&gt;*******&lt;/Password&gt;
		&lt;Port&gt;587&lt;/Port&gt;
		&lt;FromAddress&gt;email@gmail.com&lt;/FromAddress&gt;
	&lt;/SMTPSettings&gt;
	&lt;LogFileDirectory&gt;Daily&lt;/LogFileDirectory&gt;
&lt;/Settings&gt;</pre>
<p>The command line executable would then run the query (&lt;Query&gt;) against the supplied database in the XML file.  For each row returned, the program will send out an email to the user.  Which user?  What email?  The recipients email address would need to be one of the fields returned from the query and noted in the XML file in the element &lt;ToAddressDatabaseField&gt;.  The template for the email body is supplied by the &lt;TemplateEmailFileName&gt; element.   To make the email custom, it is possible to insert fields returned from the database into the email template.  For example, lets say the query returned a field called &#8220;FirstName&#8221;.  In the email template text file, you could have:</p>
<pre>Hello &lt;:FirstName:&gt;,</pre>
<p>When the program ran, it would swap &#8220;&lt;:FirstName:&gt;&#8221; with the contents from the database.  This is similar to a mail merge for emails.  Since all of the values are configurable in the XML file, the usage possibilities are unlimited!  Let say you needed to run this once a week, no problem.  Set up a Windows Scheduled Task to run the executable at the specified interval.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/09/automatic-email-alerts-from-any-sql-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook Signature</title>
		<link>http://www.databatrix.com/2009/08/outlook-signature/</link>
		<comments>http://www.databatrix.com/2009/08/outlook-signature/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 00:53:25 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[Desktop Applications]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Microsoft Office Interop]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/outlook-signature/</guid>
		<description><![CDATA[Background: My company wanted to standardize the email signature for all of the employees.  The signature was to contain images and links. Problem: Creating a signature in Microsoft Outlook that contains images and links is not the easiest thing in the world.  Not to mention having everyone in the company try to create their own, [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>My company wanted to standardize the email signature for all of the employees.  The signature was to contain images and links.</p>
<h3>Problem:</h3>
<p>Creating a signature in Microsoft Outlook that contains images and links is not the easiest thing in the world.  Not to mention having everyone in the company try to create their own, they would never end up being standardized and turn into a nightmare for training.</p>
<h3>Solution:</h3>
<p>The  solution was to create a simple desktop application that helps the user create their Outlook signature.  The basic template for the signature would originate from a central location so that updates would be easy.  The email signature also contains a header that is placed at the top of the email.</p>
<h3>Result:</h3>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/OutlookSignature1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OutlookSignature1" src="http://www.databatrix.com/wp-content/uploads/2009/08/OutlookSignature1_thumb.png" border="0" alt="OutlookSignature1" width="260" height="188" /></a>Fig. 1</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/OutlookSignature2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OutlookSignature2" src="http://www.databatrix.com/wp-content/uploads/2009/08/OutlookSignature2_thumb.png" border="0" alt="OutlookSignature2" width="260" height="149" /></a>Fig. 2 </p>
<p>I created a simple desktop application that allows the user to enter their specific signature details (Fig. 1).  When you hit the &#8220;Create Signature&#8221; several things happen.  First the email template is downloaded from a specified FTP site.  I choose FTP so that the application would work when the user was at home connected to the Internet.  Next the program inserts all of your specific info the template.  Then it saves the signature files in the appropriate folders where signature and theme files are kept.  Yes, THEME files too!  Since my company wanted a header image at the top, I had to use a theme for the template.  If I had kept everything as a signature it would always insert 3 lines at the top (that you would have to delete for every email) and spell check would not work (since Outlook does not spell check your signature).  The final step the program does is set Outlook to use the new theme for new emails and the signature for all forwards and replies.  Why not have the theme set for all emails and not even use a signature?  Outlook only uses the theme for new emails&#8230;not sure why, but that&#8217;s the way it is (or was at the time).  The program can be ran multiple times incase updates need to be made to the signature.  (For example, we did a Happy Holidays theme that we ran for a few months.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/outlook-signature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inventory Application</title>
		<link>http://www.databatrix.com/2009/08/inventory-application/</link>
		<comments>http://www.databatrix.com/2009/08/inventory-application/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 00:50:05 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Desktop Applications]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[Web Applications]]></category>

		<guid isPermaLink="false">http://www.databatrix.com/2009/08/inventory-application/</guid>
		<description><![CDATA[Background: As for any company, physical inventory time is never fun.&#160; Our inventory software did not have a good interface for doing this. Problem: The process of taking physical inventory was long and tedious.&#160; The process typically involved printing our a huge list of parts, write in the quantity next to the part, then someone [...]]]></description>
			<content:encoded><![CDATA[<h3>Background:</h3>
<p>As for any company, physical inventory time is never fun.&#160; Our inventory software did not have a good interface for doing this.</p>
<h3>Problem:</h3>
<p>The process of taking physical inventory was long and tedious.&#160; The process typically involved printing our a huge list of parts, write in the quantity next to the part, then someone would enter that info in an Excel spreadsheet so that it could be imported back into our inventory software to reconcile.&#160; Another issue was finding the inventory items themselves, most items were organized well, but some could only be found by the &quot;one guy&quot; that knows where everything is located.&#160; Identification of parts and part numbers was needed.</p>
<h3>Solution:</h3>
<p>The solution was to create a desktop application that could be used to take physical inventory.&#160; The application would search against our existing parts database and store inventory quantities in a separate table that could later be reconciled.&#160; The application would also print out a part identification label on a thermal printer that was to be placed on the shelf of each item.&#160; This would make subsequent physical inventories much easier.</p>
<h3>Result:</h3>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Inventory1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Inventory1" border="0" alt="Inventory1" src="http://www.databatrix.com/wp-content/uploads/2009/08/Inventory1_thumb.png" width="260" height="132" /></a>Fig. 1</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Inventory2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Inventory2" border="0" alt="Inventory2" src="http://www.databatrix.com/wp-content/uploads/2009/08/Inventory2_thumb.png" width="260" height="153" /></a>Fig. 2</p>
<p><a href="http://www.databatrix.com/wp-content/uploads/2009/08/Inventory3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Inventory3" border="0" alt="Inventory3" src="http://www.databatrix.com/wp-content/uploads/2009/08/Inventory3_thumb.png" width="260" height="213" /></a>Fig. 3&#160;&#160; </p>
<p>I created a desktop application the keep track of inventory.&#160; The application also has the ability to print out part identification stickers on a thermal printer that included part information along with a barcode.&#160; Fig. 2 shows the part detail screen.&#160; You can find out various information from the Detail screen as well as adjust inventory levels.&#160; You can pull up a part by either searching by part number or scan the corresponding barcode the program had previously printed out.   <br />The application was such a success, I created a web interface to allow certain other employees access to inventory levels.&#160; Also various reports were created that were needed Accounting purposes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.databatrix.com/2009/08/inventory-application/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>

