private void mnuEdit_Click(object sender, EventArgs e) { try { frmPrice_Pattern f = new frmPrice_Pattern(); f.op = "Edit"; f.Form_Load(); f.FillData(dgvStore.CurrentRow.Cells["Code"].Value.ToString()); f.ShowDialog(); } catch { frmMessage f = new frmMessage(); f.flag = 0; f.lblMessage.Text = "الگوی انتخابی معتبر نمی باشد"; f.ShowDialog(); } }
private void mnuInsert_Click(object sender, EventArgs e) { try { frmPrice_Pattern f = new frmPrice_Pattern(); if (op == "Buy") { f.op = "Buy_Add"; } else if (op == "Sell") { f.op = "Sell_Add"; } f.Form_Load(); f.ShowDialog(); } catch { } }