Click here to Skip to main content
16,018,904 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi all,
i am beginner developer in c#.net
i develop a software which will run on medical store.
so i want to print the customer sale invoice, can someone please provide code to attach printer in my C# code so i can print the bill from my client PC and printer.please provide dummy invoice so i can change it to with my information and style.
Looking forward to get reply and solution soon.
thanks
best,
zaif
Posted
Updated 5-Aug-13 5:40am
v2

1 solution

place the connectionstring in App.config file , you can change it after installation
C#
<connectionstring>
<add key="constring" connectionstring="Data Source=(local); Initial Catalog=db; Integrated Security=true;" />
</connectionstring>

use this code to retrieve the connection string
C#
SqlConnection con=new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["EmisConn"].ConnectionString);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900