2
Answers

alphanumeric number inserting into sql using csharp

sharan Kumar

sharan Kumar

10y
698
1
sir i want to generate alphanumeric number to my label in c# windows form 
this is my code
 
public class DBcodes
{
public string Sales_Invoice {get; set;}
public string Customer_Name {get; set;}
public string Mobile_No {get; set;}
public string Address {get; set;}
public string Item_Name {get; set;}
public string Item_Code {get; set;}
public string Dept {get; set;}
public string Date {get; set;}
public int Qty {get; set;}
public int Rate {get; set;}
public int Vat_tax {get; set;}
public int Amount {get; set;}
public int Payment_Type {get; set;}
public int Purchase_ID { get; set; }
string myConnection =
 
public void retriveData()
{
string selQuery="select sales_invoice from sales";
try
{
SqlConnection conn= new SqlConnection (myConnection);
conn.Open();
SqlCommand cmd = new SqlCommand (selQuery, conn);
Sales_Invoice=(string)cmd.ExecuteScalar();
conn.Close();
}
catch
{
Sales_Invoice=name/sales/1000;
 
please help me  
 
 
 
 
Answers (2)