Beispiel #1
0
        private void OnDisplayDanhSachNhanVien()
        {
            lock (ThisLock)
            {
                Result result = CompanyContractBus.GetContractMemberList(_hopDongGUID, _name, _type, _doiTuong, _traHoSo);

                if (result.IsOK)
                {
                    dgPatient.Invoke(new MethodInvoker(delegate()
                    {
                        ClearData();

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

                        dgPatient.DataSource = dt;
                        UpdateChecked(dt);
                    }));
                }
                else
                {
                    MsgBox.Show(Application.ProductName, result.GetErrorAsString("CompanyContractBus.GetContractMemberList"), IconType.Error);
                    Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetContractMemberList"));
                }
            }
        }
Beispiel #2
0
        private void OnDisplayPatientList()
        {
            lock (ThisLock)
            {
                Result result = null;
                if (_patientSearchType == Common.PatientSearchType.BenhNhan)
                {
                    result = PatientBus.GetPatientList(_name, _type);
                }
                else if (_patientSearchType == Common.PatientSearchType.BenhNhanThanThuoc)
                {
                    result = PatientBus.GetBenhNhanThanThuocList(_name, _type);
                }
                else if (_patientSearchType == Common.PatientSearchType.BenhNhanKhongThanThuoc)
                {
                    result = PatientBus.GetBenhNhanKhongThanThuocList(_name, _type);
                }
                else if (_patientSearchType == Common.PatientSearchType.NhanVienHopDong)
                {
                    result = CompanyContractBus.GetContractMemberList(_hopDongGUID, _serviceGUID, _patientGUID, _name, _type);
                }

                if (result.IsOK)
                {
                    dgPatient.Invoke(new MethodInvoker(delegate()
                    {
                        ClearDataSource();

                        DataTable dt = result.QueryResult as DataTable;
                        if (_dtTemp == null)
                        {
                            _dtTemp = dt.Clone();
                        }
                        if (_isMulti)
                        {
                            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"));
                }
            }
        }