private void button2_Click(object sender, EventArgs e) { PL.FORM_RETURN_ORDER fm = new FORM_RETURN_ORDER(); fm.txtretId.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[0].Value.ToString(); fm.txtorderid.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[1].Value.ToString(); fm.Barcode.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[11].Value.ToString(); fm.Product_name.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[2].Value.ToString(); fm.R_price.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[3].Value.ToString(); fm.Qte.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[4].Value.ToString(); fm.Dis.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[5].Value.ToString(); fm.T_Pric.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[6].Value.ToString(); fm.Prog_User.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[8].Value.ToString(); fm.Notes.Text = this.DGV_RETURN_MANGE.CurrentRow.Cells[10].Value.ToString(); fm.Text = "Return Update:" + this.DGV_RETURN_MANGE.CurrentRow.Cells[1].Value.ToString(); fm.btn_add.Text = "Update"; fm.state = "update"; fm.txtretId.ReadOnly = true; fm.btn_add.Enabled = true; fm.btn_new.Visible = false; fm.btn_order_list.Visible = false; fm.ShowDialog(); DGV_RETURN_MANGE.DataSource = return_order.GET_RETURN_ORDER(); btn_delete.Enabled = false; btn_edit.Enabled = false; btn_return_product.Enabled = false; }
public FORM_RETURN_ORDER() { InitializeComponent(); if (frm == null) /*بعين قيمة لل form لو قيمتة ب null وهى تكون قيمتها الحالية */ // .......[4] { frm = this; } txtretdone.Visible = false; labstate.Visible = false; btn_order_list.Enabled = false; btn_add.Enabled = false; }
private void button1_Click(object sender, EventArgs e) { PL.FORM_RETURN_ORDER frm = new FORM_RETURN_ORDER(); frm.ShowDialog(); }
private void addReturnBillToolStripMenuItem_Click(object sender, EventArgs e) { FORM_RETURN_ORDER frm = new FORM_RETURN_ORDER(); frm.ShowDialog(); }
private static FORM_RETURN_ORDER frm; // ......................[1] static void frm_formclosed(object sender, FormClosedEventArgs e) // ................[2] { frm = null; }