<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6394312346529897550</id><updated>2024-09-01T16:16:07.178-07:00</updated><category term="C#"/><category term="Crystal Reports"/><category term="Entity Spaces"/><category term="SQL"/><category term="Stored Procedure"/><category term="Visual WebGUI"/><title type='text'>C#, ASP.Net, SQL Server Development</title><subtitle type='html'>This blog contains how to do stuff related to C#, .Net, Crystal Reports, SQL Server.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://csharpd.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://csharpd.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Zulfiqar Ali</name><uri>http://www.blogger.com/profile/05937235625008322796</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6394312346529897550.post-169700998785446346</id><published>2011-10-15T02:40:00.001-07:00</published><updated>2011-10-15T02:41:41.610-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual WebGUI"/><title type='text'>HOW TO CHECK USER DISCONNECTION IN VISUAL WEB GUI</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
 {font-family:&quot;Arial Rounded MT Bold&quot;;
 panose-1:2 15 7 4 3 5 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:.5in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:0in;
 margin-left:.5in;
 margin-bottom:.0001pt;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:0in;
 margin-left:.5in;
 margin-bottom:.0001pt;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:.5in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
 /* List Definitions */
 ol
 {margin-bottom:0in;}
ul
 {margin-bottom:0in;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;In a Visual Web GUI application sometimes
it is required to know, if user connected or not.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;Disconnection can be occurred due to
several reasons i.e.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;Enters
another URL and navigates away.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;Closes
the browser window.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;3.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;Refreshes
the page. ( Sessions reset sometimes)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial Rounded MT Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;Following code snippet will show you the
event that can be implemented to check such behaviours:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
System;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
Gizmox.WebGUI.Forms;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
Test&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Index&lt;/span&gt; : &lt;span style=&quot;color: #2b91af;&quot;&gt;Form&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; Index()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
InitializeComponent();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;//This event is used for checking disconnection&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 1.0in; margin-right: 0in; margin-top: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: #2b91af; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Application&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;.ThreadSuspend += &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;EventHandler&lt;/span&gt;(Application_ThreadSuspend);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Application_ThreadSuspend(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt;
e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;// TODO: Add Code to do the tasks after disconnection&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharpd.blogspot.com/feeds/169700998785446346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://csharpd.blogspot.com/2011/10/how-to-check-user-disconnection-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/169700998785446346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/169700998785446346'/><link rel='alternate' type='text/html' href='http://csharpd.blogspot.com/2011/10/how-to-check-user-disconnection-in.html' title='HOW TO CHECK USER DISCONNECTION IN VISUAL WEB GUI'/><author><name>Zulfiqar Ali</name><uri>http://www.blogger.com/profile/05937235625008322796</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394312346529897550.post-7293577119740123340</id><published>2010-07-24T04:52:00.000-07:00</published><updated>2011-10-15T02:58:48.203-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Reports"/><title type='text'>HOW TO SEND A CRYSTAL REPORT DOCUMENT AS PDF DOCUMENT VIA EMAIL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;


&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt;&quot;&gt;This
code snippet describes how to send Crystal Reports via Email Programmatically&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
System;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
System.Net;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
System.Net.Mail;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
System.Windows.Forms;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
CrystalDecisions.CrystalReports.Engine;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
CrystalDecisions.Shared;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
CSharpDeveloper.Core&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CrystalReportHelperClass&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;
SendEmail(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; emailId, &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; subject, &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;
body, ReportDocument rpt, &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; fileName)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt; mm = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
mm.From = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; MailAddress(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;xyz@example.com&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;From Name&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
mm.To.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; MailAddress(emailId, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;To Name&quot;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
mm.Subject = subject;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
mm.Body = body;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
mm.Attachments.Add(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
Attachment(rpt.ExportToStream(ExportFormatType.PortableDocFormat), fileName)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt; sc = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;smtp.example.com&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
sc.Credentials = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; NetworkCredential(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;xyz@example.com&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;********&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
sc.Send(mm);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;MessageBox&lt;/span&gt;.Show(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Email
successfully sent to &quot;&lt;/span&gt; + emailId);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt;
e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;MessageBox&lt;/span&gt;.Show(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Unable
to send email to &quot;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 2.0in; margin-right: 0in; margin-top: 0in; text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;+
emailId + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; due to following error:\n\n&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp; + e.Message, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Email send error&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 2.0in; margin-right: 0in; margin-top: 0in; text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;,
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
== DialogResult.Retry&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.SendEmail(emailId, subject, body, rpt,
fileName);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharpd.blogspot.com/feeds/7293577119740123340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://csharpd.blogspot.com/2010/07/how-to-send-crystal-report-document-as.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/7293577119740123340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/7293577119740123340'/><link rel='alternate' type='text/html' href='http://csharpd.blogspot.com/2010/07/how-to-send-crystal-report-document-as.html' title='HOW TO SEND A CRYSTAL REPORT DOCUMENT AS PDF DOCUMENT VIA EMAIL'/><author><name>Zulfiqar Ali</name><uri>http://www.blogger.com/profile/05937235625008322796</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394312346529897550.post-3974317800421340603</id><published>2010-07-24T04:26:00.000-07:00</published><updated>2011-10-15T03:03:25.593-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Reports"/><title type='text'>HOW TO SHOW A CRYSTAL REPORT WITHOUT USING ODBC DATA SOURCE</title><content type='html'>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=windows-1252&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 14 (filtered)&quot;&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;

&lt;/head&gt;

&lt;body lang=EN-US&gt;

&lt;div class=WordSection1&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt;/*&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt; * This code demonstrates how to show a crystal report without
using odbc data source.&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt; * It requires connection string to display report.&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt; * Crystal report should be made using OLE-DB Data provider.&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt; * Drag the crystal report viewer on form and you may set its dock
property to fill.&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt; */&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:green&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:blue&#39;&gt;using&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;
System;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:blue&#39;&gt;using&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;
System.Data.SqlClient;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:blue&#39;&gt;using&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;
System.Windows.Forms;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:blue&#39;&gt;using&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;
CrystalDecisions.CrystalReports.Engine;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:blue&#39;&gt;using&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;
CrystalDecisions.Shared;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:blue&#39;&gt;namespace&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;
CSharpDeveloper.Core&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;   
&lt;span style=&#39;color:blue&#39;&gt;public&lt;/span&gt; &lt;span style=&#39;color:blue&#39;&gt;partial&lt;/span&gt; &lt;span
style=&#39;color:blue&#39;&gt;class&lt;/span&gt; &lt;span style=&#39;color:#2B91AF&#39;&gt;FrmReportView&lt;/span&gt;
: Form&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;   
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;       
&lt;span style=&#39;color:blue&#39;&gt;public&lt;/span&gt; FrmReportView()&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;       
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
InitializeComponent();&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
&lt;span style=&#39;color:blue&#39;&gt;this&lt;/span&gt;.crystalReportViewer1.ReportSource = &lt;span
style=&#39;color:blue&#39;&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;       
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;       
&lt;span style=&#39;color:blue&#39;&gt;public&lt;/span&gt; FrmReportView(&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
ParameterFields rptParams, ReportDocument rpt, &lt;span style=&#39;color:blue&#39;&gt;string&lt;/span&gt;
connectionString)&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
: &lt;span style=&#39;color:blue&#39;&gt;this&lt;/span&gt;()&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;       
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
&lt;span style=&#39;color:blue&#39;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:blue&#39;&gt;this&lt;/span&gt;.Text = rpt.FileName;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:blue&#39;&gt;if&lt;/span&gt; (rptParams != &lt;span style=&#39;color:blue&#39;&gt;null&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;                   
&lt;span style=&#39;color:blue&#39;&gt;this&lt;/span&gt;.crystalReportViewer1.ParameterFieldInfo =
rptParams;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:green&#39;&gt;//Load report from its location&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
rpt.Load(rpt.FileName);&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:green&#39;&gt;//Set report on report viewer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:blue&#39;&gt;this&lt;/span&gt;.crystalReportViewer1.ReportSource = rpt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
SqlConnectionStringBuilder sb = &lt;span style=&#39;color:blue&#39;&gt;new&lt;/span&gt;
SqlConnectionStringBuilder(connectionString);&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
rpt.SetDatabaseLogon(&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;                   
sb.UserID, sb.Password, sb.DataSource, sb.InitialCatalog, &lt;span
style=&#39;color:blue&#39;&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:green&#39;&gt;//Extract connection info from connection
string            &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
ConnectionInfo ci = &lt;span style=&#39;color:blue&#39;&gt;new&lt;/span&gt; ConnectionInfo();&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
ci.ServerName = sb.DataSource;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
ci.DatabaseName = sb.InitialCatalog;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
ci.UserID = sb.UserID;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
ci.Password = sb.Password;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:green&#39;&gt;//Create TableLogOnInfo object and set connection
info&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
TableLogOnInfo tli = &lt;span style=&#39;color:blue&#39;&gt;new&lt;/span&gt; TableLogOnInfo();&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
tli.ConnectionInfo = ci;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:green&#39;&gt;//Apply log on info to each table of report&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
&lt;span style=&#39;color:blue&#39;&gt;foreach&lt;/span&gt; (Table table &lt;span style=&#39;color:blue&#39;&gt;in&lt;/span&gt;
rpt.Database.Tables)&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;                   
table.ApplyLogOnInfo(tli);&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
&lt;span style=&#39;color:blue&#39;&gt;catch&lt;/span&gt; (&lt;span style=&#39;color:#2B91AF&#39;&gt;Exception&lt;/span&gt;
e)&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
{&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;               
MessageBox.Show(e.Message);&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;           
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;       
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style=&#39;margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;&#39;&gt;   
}&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style=&#39;font-size:10.0pt;line-height:115%;font-family:
&quot;Courier New&quot;&#39;&gt;}&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharpd.blogspot.com/feeds/3974317800421340603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://csharpd.blogspot.com/2010/07/how-to-show-crystal-report-without.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/3974317800421340603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/3974317800421340603'/><link rel='alternate' type='text/html' href='http://csharpd.blogspot.com/2010/07/how-to-show-crystal-report-without.html' title='HOW TO SHOW A CRYSTAL REPORT WITHOUT USING ODBC DATA SOURCE'/><author><name>Zulfiqar Ali</name><uri>http://www.blogger.com/profile/05937235625008322796</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394312346529897550.post-8874949162137175192</id><published>2010-07-23T23:55:00.000-07:00</published><updated>2011-10-15T02:51:43.207-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Spaces"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure"/><title type='text'>HOW TO CALL A STORED PROCEDURE USING ENTITY SPACES ESUTILITY CLASS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Following code sample demonstrated how
to call a stored procedure using entity spaces esUtility class, return output
parameters from it and display those output parameters in a message box.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Simple stored procedure&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ANSI_NULLS&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;QUOTED_IDENTIFIER&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;PROCEDURE&lt;/span&gt; spTest&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
@p1 &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 0&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
@p2 &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 0 &lt;span style=&quot;color: blue;&quot;&gt;OUTPUT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;AS&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;BEGIN&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;NOCOUNT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; @p2 &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; @p1 &lt;span style=&quot;color: grey;&quot;&gt;*&lt;/span&gt; 10000&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;END&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Simple function in c#&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; SPTest()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #31859c;&quot;&gt;esUtility&lt;/span&gt; es = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
&lt;span style=&quot;color: #31859c;&quot;&gt;esUtility&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;//No need to use @ sign&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #31859c;&quot;&gt;esParameter&lt;/span&gt; p1 = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
&lt;span style=&quot;color: #31859c;&quot;&gt;esParameter&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;p1&quot;&lt;/span&gt;,
25, esParameterDirection.Input, DbType.Int32, 0);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #31859c;&quot;&gt;esParameter&lt;/span&gt; p2 = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
&lt;span style=&quot;color: #31859c;&quot;&gt;esParameter&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;p2&quot;&lt;/span&gt;,
esParameterDirection.Output, DbType.Int32, 0);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #31859c;&quot;&gt;esParameters&lt;/span&gt; parameters = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #31859c;&quot;&gt;esParameters&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
parameters.Add(p1);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
parameters.Add(p2);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
es.ExecuteNonQuery(&lt;span style=&quot;color: #31859c;&quot;&gt;EntitySpaces.Interfaces.esQueryType.StoredProcedure&lt;/span&gt;,
&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;spTest&quot;&lt;/span&gt;, parameters);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #31859c;&quot;&gt;MessageBox&lt;/span&gt;.Show(p2.Value.ToString());&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt; (Exception e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #31859c;&quot;&gt;MessageBox&lt;/span&gt;.Show(e.Message);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharpd.blogspot.com/feeds/8874949162137175192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://csharpd.blogspot.com/2010/07/how-to-call-stored-procedure-using.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/8874949162137175192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394312346529897550/posts/default/8874949162137175192'/><link rel='alternate' type='text/html' href='http://csharpd.blogspot.com/2010/07/how-to-call-stored-procedure-using.html' title='HOW TO CALL A STORED PROCEDURE USING ENTITY SPACES ESUTILITY CLASS'/><author><name>Zulfiqar Ali</name><uri>http://www.blogger.com/profile/05937235625008322796</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>