Пример #1
0
 private void MnuDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (DGrid.RowCount == 0)
         {
             return;
         }
         Guid       accGuid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
         var        Acc     = HazineBussines.Get(accGuid);
         string     message = "آیا از حذف حساب " + Acc.Name + " " + "اطمینان دارید؟";
         frmMessage frm     = new frmMessage(EnumMessageFlag.DeleteFlag, Color.PapayaWhip, message);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             Acc = HazineBussines.Change_Status(accGuid, false);
             var        a = Acc.Save();
             frmMessage f = new frmMessage(EnumMessageFlag.ShowFlag, Color.Green, "عملیات با موفقیت انجام شد");
             f.ShowDialog();
             LoadData();
         }
     }
     catch (Exception exception)
     {
         frmMessage frm = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, exception.Message);
         frm.ShowDialog();
     }
 }
Пример #2
0
 public frmHazine(Guid hazineGuid, bool Is_Show)
 {
     InitializeComponent();
     hazine             = HazineBussines.Get(hazineGuid);
     grpAccount.Enabled = Is_Show;
     btnFinish.Enabled  = Is_Show;
 }