private void mnuEdit_Click(object sender, EventArgs e) { try { if (dgvStore.CurrentRow.Cells["State_Name"].Value.ToString() != "پرداخت نشده") { frmMessage f = new frmMessage(); f.flag = 0; f.lblMessage.Text = "فقط اقساط پرداخت نشده قابل ویرایش می باشند"; f.ShowDialog(); } else { frmCus_Installment f = new frmCus_Installment(); f.op = "Edit"; f.Fill_Data(System.Guid.Parse(dgvStore.CurrentRow.Cells["GuidCell"].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 { frmCus_Installment f = new frmCus_Installment(); f.op = "Add"; f.Form_Load(); f.ShowDialog(); } catch { } }
private void mnuView_Click(object sender, EventArgs e) { try { frmCus_Installment f = new frmCus_Installment(); f.Fill_Data(System.Guid.Parse(dgvStore.CurrentRow.Cells["GuidCell"].Value.ToString())); f.grp1.Enabled = false; f.btnFinish.Enabled = false; f.ShowDialog(); } catch { frmMessage f = new frmMessage(); f.flag = 0; f.lblMessage.Text = "قسط انتخابی معتبر نمی باشد"; f.ShowDialog(); } }