private void OnDisplayPatientList()
        {
            lock (ThisLock)
            {
                Result result = CompanyContractBus.GetDanhSachNhanVien(_hopDongGUID, _type2, _name, _type);
                if (result.IsOK)
                {
                    dgPatient.Invoke(new MethodInvoker(delegate()
                    {
                        ClearData2();

                        DataTable dt = result.QueryResult as DataTable;
                        if (_dtTemp == null)
                        {
                            _dtTemp = dt.Clone();
                        }
                        UpdateChecked(dt);
                        dgPatient.DataSource = dt;

                        lbKetQuaTimDuoc.Text = string.Format("Kết quả tìm được: {0}", dt.Rows.Count);
                    }));
                }
                else
                {
                    MsgBox.Show(Application.ProductName, result.GetErrorAsString("PatientBus.GetPatientList"), IconType.Error);
                    Utility.WriteToTraceLog(result.GetErrorAsString("PatientBus.GetPatientList"));
                }
            }
        }
Beispiel #2
0
        private void OnDisplayInfo()
        {
            Result result = CompanyContractBus.GetDanhSachNhanVien(_contractGUID, _type, string.Empty, 0);

            if (result.IsOK)
            {
                MethodInvoker method = delegate
                {
                    dgDSNV.DataSource = result.QueryResult;
                    RefreshNo();
                };

                if (InvokeRequired)
                {
                    BeginInvoke(method);
                }
                else
                {
                    method.Invoke();
                }
            }
            else
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("CompanyContractBus.GetDanhSachNhanVien"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetDanhSachNhanVien"));
            }
        }