Пример #1
0
        private async void mnuEdit_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null)
                {
                    return;
                }
                var guid   = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
                var tafsil = await AdjectiveDescriptionBussines.GetAsync(guid);

                if (tafsil == null)
                {
                    frmNotification.PublicInfo.ShowMessage("شرح انتخاب شده معتبر نمی باشد");
                    return;
                }

                var frm = new frmDescMain(guid);
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    await LoadDataAsync(txtSearch.Text);
                }
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Пример #2
0
 private async void mnuAdd_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmDescMain();
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             await LoadDataAsync();
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }