private void button1_Click(object sender, EventArgs e) { try { SupAcc_update sAccUp = new SupAcc_update(); sAccUp.stNo = dgv_sup_acc.CurrentRow.Cells["Stock_No"].Value.ToString(); sAccUp.stDate = dgv_sup_acc.CurrentRow.Cells["Recive_date"].Value.ToString(); sAccUp.st_descrip = dgv_sup_acc.CurrentRow.Cells["Discription"].Value.ToString(); sAccUp.stSup = dgv_sup_acc.CurrentRow.Cells["Supplier"].Value.ToString(); sAccUp.purchPriz = dgv_sup_acc.CurrentRow.Cells["Purchase_Price"].Value.ToString(); sAccUp.paid = dgv_sup_acc.CurrentRow.Cells["Payment"].Value.ToString(); sAccUp.payMethd = dgv_sup_acc.CurrentRow.Cells["payment_Method"].Value.ToString(); sAccUp.nme = dgv_sup_acc.CurrentRow.Cells["Item_Name"].Value.ToString(); sAccUp.catgy = dgv_sup_acc.CurrentRow.Cells["Catogory"].Value.ToString(); sAccUp.subcgy = dgv_sup_acc.CurrentRow.Cells["Sub_Catogory"].Value.ToString(); sAccUp.brand = dgv_sup_acc.CurrentRow.Cells["Brande"].Value.ToString(); sAccUp.qqty = dgv_sup_acc.CurrentRow.Cells["Quntity"].Value.ToString(); sAccUp.un_piz = dgv_sup_acc.CurrentRow.Cells["Unit_purchas_price"].Value.ToString(); sAccUp.un_sal = dgv_sup_acc.CurrentRow.Cells["Unit_sale_price"].Value.ToString(); sAccUp.styp = dgv_sup_acc.CurrentRow.Cells["Stock_type"].Value.ToString(); sAccUp.itype = dgv_sup_acc.CurrentRow.Cells["Item_Type"].Value.ToString(); this.Visible = false; Edit_Receive_Stock stockEdit = new Edit_Receive_Stock(sAccUp); stockEdit.ShowDialog(this); } catch (Exception) { //MessageBox.Show("This Supplier No Add Stock"); toolTip1.Show("This Supplier No Add Stock", groupBox2, 3000); } }
public Edit_Receive_Stock(SupAcc_update supB) { InitializeComponent(); supA = supB; }