Пример #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 frm = new frmPardakhtMain(guid, false);
                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 frmPardakhtMain();
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             await LoadDataAsync();
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
Пример #3
0
        private void mnuView_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 frm = new frmPardakhtMain(guid, true);
                frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }