Load Counter
motorcycle helmets

Thursday 29 January 2015

How To Create Setup And Deployment Project With Crystal Report In Visual Studio 2010

It is the most important phase/step to distribute the project to end user’s PC what you have developed for customer. It is found that the project is running successfully associated with all necessary resources in the development environment. But in the client’s PC, report is not shown due to lack of resource files. It will be wise to develop a single package including all resource files so that user can install the project on his/her PC easily & quickly and run the project successfully with connecting to database server.


Here I’ve given some steps for creating setup file of the project which is developed in Microsoft Visual Studio 2010 by using C# programming language and for database Microsoft SQL Server 2008. By following the below steps, it is easy to create an installer of the project.


Step-1: Open the project which project is going to be a setup package, with Microsoft Visual Studio 2010. Right click on project name (proINTRASYS) in the solution explorer and follow the sequence: proINTRASYS>Add>New Project…

Step-2: Select a new project from ‘add new project dialog box’ and type project name with project version & specify project save path like as below picture.
Step-3: Click on next button & Just follow below picture.

Step-4: Select the option ‘Create a setup for a Windows application’ & click on next button.


Step-5: Select the option ‘Primary output from proINTRASYS’ and click on next button.


Step-6: Again click on Next button and click on Finish button. Below view will be appeared.




Step-7: Right click on ‘Application Folder and follow the sequence Application>Add>File




Step-8: ‘Add Files’ dialog box will be appeared and select any ico (icon file) from your project folder. This ico file will be used for project icon.




Step-9:  Right click on the option ‘Primary output from proINTRASYS (Active)’




Step-10: Rename ‘Shortcut to Primary output from proINTRASYS (Active)’ to ‘INTRASYS v1.33’

Step-11: Browse your icon file from your project folder.


Step-12: After click on Browse button shown in picture of previous step, below two dialog box will be appeared and follow the picture to select icon file.

Step-13: Select icon file and click OK button.
Step-14: Drag INTRASYS v1.33 and drop on User’s Desktop.


Step-15: Add a new folder ‘INTRASYS’ under User’s Program Menu like as below picture.

Step-16: Create another ‘INTRASYS v1.33’ to follow the previous steps-9, 10, 11, 12 & 13 and drag it to INTRASYS folder.

Step-17: Follow this below picture.




Step-18: Click on Properties and follow the below picture. See perquisites box, have to select two option 1. Microsoft .Net Framework4 (x86 and x64) 2. Windows Installer 3.1 (go down with scroll bar).




Step-19: This is final step. Right click on project and click on ‘Build’ button.

After installation of this setup file what we have created now, we have to install the below two files (Crystal Report) on client's PC.

CRRuntime_32bit_13_0_9
CRRuntime_64bit_13_0_9
Because we have selected the option for both 32bit & 64bit.

Saturday 16 November 2013

How to specify password policy to a textbox control


To validate the textbox control with some specific digit in C# coding for a Windows Application is the main object of this article. User must be instructed to type password in A-Z, a-z, 0-9 and special character as password/secret code.

Password is secret code or string of characters which is applied to authenticate the identity of user in a system. It is very ancient mechanism to protect system from unauthorized access by using secret code. In order select the password character or digit, most of organization follow some rules and regulation with some password policy.

Here I have given an example for a password validation code snippet by using very simple and basic common algorithm through textbox control in C#. In this rules of password validation, you are allowed to type any alphabet, numeric and special characters as password value.
For more please click on below link:

Monday 11 November 2013

How to Display Picture From Database to Picture Box Control

Here I've given a very simple code snippet with you can display image from database.


private void DisplayPictureFromDB()
{

SqlConnection cnMyPro = new SqlConnection();
 
string qryMyPro = "SELECT Description FROM ProductInfo";
if (cnMyPro.State != ConnectionState.Open)
cnMyPro.Open();

SqlCommand cmdMyPro = new SqlCommand(qryMyPro, cnMyPro);
SqlDataReader sdrMyPro =cmdMyPro.ExecuteReader();
sdrMyPro.Read();

if (sdrMyPro.HasRows)
{

byte[] MyImage = (byte[])(sdrMyPro[2]);
if (MyImage == null)
picDescription.Image = null;

else
{

MemoryStream msMyPro = new MemoryStream(MyImage);
picDescription.Image =Image.FromStream(msMyPro);
 
}
}
}

Sunday 10 November 2013

How to Import data from excel sheet to Access Database using DataGridView control in C#.

In this article, how data can be transferred from excel sheet to a table of Access Database through DataGridView using OleDB database connectivity in C#, is revealed with simple source code. It is complete apps in which you can import data from a particular formatted excel sheet and insert into a table of Access Database with eliminating duplicate data.


To transfer data from one format (system/file) to another format (system/file) is a common and essential task for a software developer. Here I have explained elaborately with very simple code snippet and developed three functions in C# which are the heart of this apps. Firstly, GetExcel() function is called to load data into DataGridView from excel sheet, InsertData() function work to save data into Access Database from DataGridView and third function name is CheckDuplicate() which play role to check the duplicate data.
Excel File Importer