Exemplo n.º 1
0
 private void mnuInsert_Click(object sender, EventArgs e)
 {
     if (Flag == 1)
     {
         frmAccount f = new frmAccount();
         f.op   = "Add";
         f.flag = 0;
         f.Form_Load();
         try
         {
             f.cmbAccount.Text = trvAccount.SelectedNode.Text;
         }
         catch
         {
         }
         f.ShowDialog();
     }
     else
     {
         frmAccount f = new frmAccount();
         f.op   = "Add";
         f.flag = 0;
         f.Form_Load();
         f.ShowDialog();
     }
 }
 private void mnuInsert_Click(object sender, EventArgs e)
 {
     try
     {
         frmAccount f = new frmAccount();
         f.op   = "Add";
         f.flag = 0;
         f.Form_Load();
         f.ShowDialog();
     }
     catch
     {
     }
 }
Exemplo n.º 3
0
 private void MnuInsert_Click(object sender, EventArgs e)
 {
     try
     {
         frmAccount frm = new frmAccount();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData();
         }
     }
     catch (Exception exception)
     {
         frmMessage frm = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, exception.Message);
         frm.ShowDialog();
     }
 }
Exemplo n.º 4
0
 private void MnuEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (DGrid.RowCount == 0)
         {
             return;
         }
         Guid       _guid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
         frmAccount frm   = new frmAccount(_guid, true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData();
         }
     }
     catch (Exception exception)
     {
         frmMessage frm = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, exception.Message);
         frm.ShowDialog();
     }
 }
Exemplo n.º 5
0
 private void mnuView_Click(object sender, EventArgs e)
 {
     if (Flag == 0)
     {
         try
         {
             frmAccount f = new frmAccount();
             f.FillData(dgvAccount.CurrentRow.Cells["Description"].Value.ToString());
             f.grpAccount.Enabled = false;
             f.btnFinish.Enabled  = false;
             f.ShowDialog();
         }
         catch
         {
             frmMessage f = new frmMessage();
             f.flag            = 0;
             f.lblMessage.Text = "حساب انتخابی معتبر نمی باشد";
             f.ShowDialog();
         }
     }
     else if (Flag == 1)
     {
         try
         {
             frmAccount f = new frmAccount();
             f.FillData(trvAccount.SelectedNode.Text);
             f.grpAccount.Enabled = false;
             f.btnFinish.Enabled  = false;
             f.ShowDialog();
         }
         catch
         {
             frmMessage f = new frmMessage();
             f.flag            = 0;
             f.lblMessage.Text = "حساب انتخابی معتبر نمی باشد";
             f.ShowDialog();
         }
     }
 }