Пример #1
0
        private void OnDisplayGiaVonDichVuList()
        {
            Result result = GiaVonDichVuBus.GetGiaVonDichVuList(_isFromDateToDate, _fromDate, _toDate, _tenDichVu);

            if (result.IsOK)
            {
                MethodInvoker method = delegate
                {
                    ClearData();
                    dgGiaVonDichVu.DataSource = result.QueryResult as DataTable;
                };

                if (InvokeRequired)
                {
                    BeginInvoke(method);
                }
                else
                {
                    method.Invoke();
                }
            }
            else
            {
                MsgBox.Show(Application.ProductName, result.GetErrorAsString("GiaVonDichVuBus.GetGiaThuocList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("GiaVonDichVuBus.GetGiaThuocList"));
            }
        }