예제 #1
0
 private async void mnuEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (DGrid.RowCount <= 0)
         {
             return;
         }
         if (DGrid.CurrentRow == null)
         {
             return;
         }
         var guid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
         var con  = ContractBussines.Get(guid);
         if (con == null)
         {
             return;
         }
         if (!con.IsTemp)
         {
             frmNotification.PublicInfo.ShowMessage(
                 "شما مجاز به ویرایش داده نهایی شده نمی باشید");
             return;
         }
         var frm = new frmContractMain(guid, false);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             await LoadDataAsync(txtSearch.Text);
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
예제 #2
0
 public frmContractMain(Guid guid, bool isShowMode)
 {
     InitializeComponent();
     WindowState = FormWindowState.Maximized;
     cls         = ContractBussines.Get(guid);
     fSide       = PeoplesBussines.Get(cls.FirstSideGuid);
     sSide       = PeoplesBussines.Get(cls.SecondSideGuid);
     building    = BuildingBussines.Get(cls.BuildingGuid);
     superTabControl1.SelectedTab   = superTabItem5;
     superTabControl2.SelectedTab   = superTabItem8;
     superTabControlPanel1.Enabled  = !isShowMode;
     superTabControlPanel2.Enabled  = !isShowMode;
     superTabControlPanel3.Enabled  = !isShowMode;
     superTabControlPanel4.Enabled  = !isShowMode;
     superTabControlPanel5.Enabled  = !isShowMode;
     superTabControlPanel6.Enabled  = !isShowMode;
     superTabControlPanel7.Enabled  = !isShowMode;
     superTabControlPanel10.Enabled = !isShowMode;
     superTabControlPanel8.Enabled  = !isShowMode;
     superTabControlPanel11.Enabled = !isShowMode;
     btnFinish.Enabled = !isShowMode;
 }