private void RefreshGrid()
        {
            try
            {
                this.salesOrders         = dataModel.Refresh();
                grSalesOrders.DataSource = this.salesOrders;

                if (this.salesOrders != null && this.salesOrders.Rows.Count == 0)
                {
                    // There are no sales orders in the database for this customer....
                    SalesOrder.InternalApplication.Services.Dialog.ShowMessage(56123, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            catch (Exception ex)
            {
                LSRetailPosis.ApplicationExceptionHandler.HandleException(this.ToString(), ex);

                // "An error occurred while refreshing the list."
                SalesOrder.InternalApplication.Services.Dialog.ShowMessage(56232, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.EnableButtons();
        }
Example #2
0
 void refreshWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     dataModel.Refresh();
 }