Example #1
0
        private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox4.SelectedValue != null)
            {
                Cus_Sup_Table Obj = BussinessObj.SupplierbyMobile(comboBox4.SelectedValue.ToString());
                CusName.Text   = Obj.Cus_Sup_Name;
                CusComp.Text   = Obj.Cus_Sup_Company;
                CusEmail.Text  = Obj.Cus_Sup_Email;
                CusNotes.Text  = Obj.Cus_Sup_Notes;
                CusMobile.Text = Obj.Cus_Sup_Mobile;

                Lis = BussinessObj.SellectPurchZeroByMobile(comboBox4.SelectedValue.ToString());
            }

            dataGridView1.Rows.Clear();
            UpdateDataGridView();
            dataGridView2.Rows.Clear();
            UpdateDataGridView2();

            if (Lis != null)
            {
                int     x     = dataGridView1.Rows.Count + 1;
                decimal Total = 0;
                foreach (Purchases_Table item in Lis)
                {
                    row = new string[] { (x++).ToString(), item.Purchases_ID.ToString(), item.Purch_Total.ToString(), item.Purch__Pauid.ToString(), item.Purch_Remin.ToString(), item.Addation_Date.ToString().Replace("12:00:00 Am", "").Replace("12:00:00 ص", ""), item.Notes };
                    dataGridView1.Rows.Add(row);
                    Total = Total + item.Purch_Total;
                }
                textEdit1.Text = Total.ToString();
            }
        }
 private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox4.SelectedValue != null)
     {
         Cus_Sup_Table Obj = BussinessObj.Customerbyid(int.Parse(comboBox4.SelectedValue.ToString()));
         CusName.Text   = Obj.Cus_Sup_Name;
         CusComp.Text   = Obj.Cus_Sup_Company;
         CusEmail.Text  = Obj.Cus_Sup_Email;
         CusNotes.Text  = Obj.Cus_Sup_Notes;
         CusMobile.Text = Obj.Cus_Sup_Mobile;
     }
 }
Example #3
0
        private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox4.SelectedValue != null)
            {
                Cus_Sup_Table Obj = BussinessObj.Supplierbyid(int.Parse(comboBox4.SelectedValue.ToString()));

                SupName.Text    = Obj.Cus_Sup_Name;
                SuppEmail.Text  = Obj.Cus_Sup_Email;
                SuppCopm.Text   = Obj.Cus_Sup_Company;
                SuppMobile.Text = Obj.Cus_Sup_Mobile;
                SuppNote.Text   = Obj.Cus_Sup_Notes;
            }
        }