Example #1
0
 private void txt_mobile1_KeyPress(object sender, KeyPressEventArgs e)
 {
     db.isDigit(e);
     if (e.KeyChar == Convert.ToChar(Keys.Return))
     {
         db.readData("Select cust_name from customer where cust_mobile = '" + txt_mobile1.Text + "'", txt_cust_name);
         db.readData("Select cust_company from customer where cust_mobile = '" + txt_mobile1.Text + "'", txt_comp_name);
         this.ActiveControl = txt_prod_id;
         enableIdata();
         txt_mobile1.Enabled = false;
     }
 }
Example #2
0
 private void btn_inv_num_search_Click(object sender, EventArgs e)
 {
     if (txt_inv_mob.Text == "")
     {
     }
     else
     {
         db.readData("Select cust_company, cust_name, cust_mobile, cust_mobile2, cust_city from customer where cust_mobile = '" + txt_inv_mob.Text + "'", dataGridView1);
         db.readData("Select cust_company from customer where cust_mobile = '" + txt_inv_mob.Text + "'", txt_inv_company);
         //db.readData("Select cust_company from customer where cust_mobile = '" +txt_inv_mob.Text +"'",txt_cust_comp);
         //db.readData("Select cust_name from customer where cust_mobile1 = '" + txt_inv_mob.Text + "'", txt_cust_name);
         //db.readData("Select cust_mobile2 from customer where cust_mobile1 = '" + txt_inv_mob.Text + "'", txt_cust_mob2);
     }
 }
 public Customer()
 {
     InitializeComponent();
     simpleSoft.dbClass db = new dbClass();
     db.readData("Select cust_code AS CODE, cust_name AS NAME, cust_company AS COMPANY, cust_city AS CITY, cust_mobile AS MOBILE1, cust_mobile2 AS MOBILE2, cust_office1 AS OFFICE,cust_fax AS FAX from customer", dataGridView1);
     btn_edited.Enabled = false;
 }
Example #4
0
        public addInvoice()
        {
            InitializeComponent();
            dbClass db = new dbClass();

            db.readData("Select MAX(inv_num) from invoice", txt_inv_number, 1);
            addIdataColumn();
            disableforever();
            disableIdata();
            txt_temp.Hide();
        }
 public editInvoice()
 {
     InitializeComponent();
     db.readData("Select MAX(inv_num) from invoice", txt_inv_number);
     txt_temp.Hide();
 }