Example #1
0
 private void LoadData()
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         DBGrid.toolCancelFrozen_Click(null, null);
         BindingCollection <modPriceAdjustForm> list = _dal.GetIList(rbStatus0.Checked ? "0" : "1", string.Empty, rbStatus0.Checked ? string.Empty : dtpFrom.Text, rbStatus0.Checked ? string.Empty : dtpTo.Text, out Util.emsg);
         DBGrid.DataSource = list;
         if (list == null && !string.IsNullOrEmpty(Util.emsg))
         {
             MessageBox.Show(Util.emsg, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else
         {
             AddComboBoxColumns();
             DBGrid.ReadOnly = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }