private void mnuInsert_Click(object sender, EventArgs e) { try { frmProduction f = new frmProduction(); f.op = "Add"; f.Form_Load(); f.ShowDialog(); } catch { } }
private void mnuEdit_Click(object sender, EventArgs e) { try { frmProduction f = new frmProduction(); f.op = "Edit"; f.FillData(Convert.ToInt32(dgvStore.CurrentRow.Cells["ID"].Value.ToString())); f.ShowDialog(); } catch { frmMessage f = new frmMessage(); f.flag = 0; f.lblMessage.Text = "فرمول انتخابی معتبر نمی باشد"; f.ShowDialog(); } }
private void mnuView_Click(object sender, EventArgs e) { try { frmProduction f = new frmProduction(); f.FillData(Convert.ToInt32(dgvStore.CurrentRow.Cells["ID"].Value.ToString())); f.btnFinish.Enabled = false; f.dgvStore.Enabled = false; f.groupPanel1.Enabled = false; f.groupPanel2.Enabled = false; f.grp1.Enabled = false; f.txtP_Cost.Enabled = false; f.ShowDialog(); } catch { frmMessage f = new frmMessage(); f.flag = 0; f.lblMessage.Text = "فرمول انتخابی معتبر نمی باشد"; f.ShowDialog(); } }