public FORM_COUSTOMERS() { if (frm == null) { frm = this; } InitializeComponent(); ID_COUST.Text = COUST.GET_ID_COUST().ToString(); }
private void button_EDIT_COUST_Click(object sender, EventArgs e) { if (this.gridView1.RowCount > 0) { string ID_COUST = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["ID_COUSTOMER"]).ToString(); string COUST_NAME = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["COUST_NAME"]).ToString(); string COUST_TEL = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["TEL"]).ToString(); string COUST_ADD = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["ADDRESS"]).ToString(); string COUST_TYPE = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["COUST_TYPE"]).ToString(); FORM_COUSTOMERS FORM = new FORM_COUSTOMERS(); FORM.ID_COUST.Text = ID_COUST; FORM.textBox_COUST_NAME.Text = COUST_NAME; FORM.textBox_COUST_TEL.Text = COUST_TEL; FORM.textBox_COUST_ADD.Text = COUST_ADD; FORM.comboBox_COUST_TYPE.Text = COUST_TYPE; FORM.Text = "تحديث بيانات"; FORM.groupBox1.Text = "بيانات الزبون"; FORM.button_ADD_NEW_COUST.Text = "تحديث"; FORM.stat = "update"; FORM.ShowDialog(); } }
private void button_ADDCOUST_Click(object sender, EventArgs e) { FORM_COUSTOMERS FORM = new FORM_COUSTOMERS(); FORM.ShowDialog(); }
static void frm_FormClosed(object sender, FormClosedEventArgs e) { frm = null; }