Exemplo n.º 1
0
        private void InitData()
        {
            Cursor.Current       = Cursors.WaitCursor;
            dtpkActiveDate.Value = DateTime.Now;

            //Service
            Result result = ServicesBus.GetServicesList(ServiceType.CanLamSang);

            if (!result.IsOK)
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                return;
            }
            else
            {
                DataTable dtService = result.QueryResult as DataTable;
                DataRow   row       = dtService.NewRow();
                row["ServiceGUID"] = Guid.Empty.ToString();
                row["Name"]        = " ";
                dtService.Rows.InsertAt(row, 0);

                serviceGUIDDataGridViewTextBoxColumn.DataSource    = dtService;
                serviceGUIDDataGridViewTextBoxColumn.DisplayMember = "Name";
                serviceGUIDDataGridViewTextBoxColumn.ValueMember   = "ServiceGUID";
            }

            DisplayDocStaffList();

            btnAdd.Enabled = Global.AllowAddLoiKhuyen;
        }
Exemplo n.º 2
0
        private void InitData()
        {
            //Service
            Result result = ServicesBus.GetServicesList();

            if (!result.IsOK)
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                return;
            }
            else
            {
                cboService.DataSource = result.QueryResult;
            }

            //Dich Vụ Con
            result = CompanyContractBus.GetDichVuCon(Guid.Empty.ToString());
            if (!result.IsOK)
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("CompanyContractBus.GetDichVuCon"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetDichVuCon"));
                return;
            }
            else
            {
                dgDichVuCon.DataSource = result.QueryResult;
            }
        }
Exemplo n.º 3
0
        private void InitData()
        {
            Cursor.Current = Cursors.WaitCursor;
            dtpkActiveDate.Value = DateTime.Now;

            //Service
            Result result = ServicesBus.GetServicesList();
            if (!result.IsOK)
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                return;
            }
            else
            {
                cboService.DataSource = result.QueryResult;
            }

            DisplayBacSiChiDinhList();

            if (_hopDongGUID != string.Empty)
            {
                raKhamTheoHopDong.Enabled = false;
                chkChuyenNhuong.Enabled = false;
                txtChuyenNhuong.Enabled = false;
                btnChonBenhNhan.Enabled = false;
            }
        }
Exemplo n.º 4
0
        private void OnDisplayServicesList()
        {
            lock (ThisLock)
            {
                Result result = ServicesBus.GetServicesList(_name);
                if (result.IsOK)
                {
                    dgService.Invoke(new MethodInvoker(delegate()
                    {
                        ClearData();

                        DataTable dt = result.QueryResult as DataTable;
                        if (_dtTemp == null)
                        {
                            _dtTemp = dt.Clone();
                        }
                        UpdateChecked(dt);
                        dgService.DataSource = dt;
                    }));
                }
                else
                {
                    MsgBox.Show(Application.ProductName, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                    Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                }
            }
        }
        private void InitData()
        {
            Cursor.Current = Cursors.WaitCursor;
            dgBenhNhanNgoaiGoiKham.DataSource = _dtSource;
            ngayKhamDataGridViewTextBoxColumn.DefaultCellStyle.NullValue = DateTime.Now.ToString("dd/MM/yyyy");

            Result result = ServicesBus.GetServicesList();

            if (result.IsOK)
            {
                DataTable dtService = result.QueryResult as DataTable;
                DataRow   row       = dtService.NewRow();
                row["ServiceGUID"] = Guid.Empty.ToString();
                row["Name"]        = " ";
                dtService.Rows.InsertAt(row, 0);

                serviceGUIDDataGridViewTextBoxColumn.DataSource    = dtService;
                serviceGUIDDataGridViewTextBoxColumn.DisplayMember = "Name";
                serviceGUIDDataGridViewTextBoxColumn.ValueMember   = "ServiceGUID";
            }
            else
            {
                MsgBox.Show(Application.ProductName, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                this.Close();
            }
        }
Exemplo n.º 6
0
        private void OnDisplayServiceList()
        {
            Cursor.Current = Cursors.WaitCursor;
            Result result = ServicesBus.GetServicesList();

            if (result.IsOK)
            {
                cboService.DataSource = result.QueryResult;
            }
            else
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
            }
        }
Exemplo n.º 7
0
        private void InitData()
        {
            dtpkActiveDate.Value = DateTime.Now;

            //Service
            Result result = ServicesBus.GetServicesList();

            if (!result.IsOK)
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                return;
            }
            else
            {
                cboService.DataSource = result.QueryResult;
            }
        }
Exemplo n.º 8
0
        private void InitData()
        {
            Cursor.Current = Cursors.WaitCursor;
            cboLanDauTaiKham.SelectedIndex = 0;

            Result result = PatientBus.GetPatientList();

            if (result.IsOK)
            {
                DataTable dtPatient = result.QueryResult as DataTable;
                DataRow   row       = dtPatient.NewRow();
                row["PatientGUID"] = Guid.Empty.ToString();
                row["FullName"]    = string.Empty;
                dtPatient.Rows.InsertAt(row, 0);

                cboBenhNhan.DataSource = dtPatient;
            }
            else
            {
                MsgBox.Show(Application.ProductName, result.GetErrorAsString("PatientBus.GetPatientList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("PatientBus.GetPatientList"));
            }

            result = ServicesBus.GetServicesList();
            if (result.IsOK)
            {
                DataTable dtService = result.QueryResult as DataTable;
                DataRow   row       = dtService.NewRow();
                row["ServiceGUID"] = Guid.Empty.ToString();
                row["Name"]        = " ";
                dtService.Rows.InsertAt(row, 0);

                cboService.DataSource = dtService;
            }
            else
            {
                MsgBox.Show(Application.ProductName, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
            }
        }
Exemplo n.º 9
0
        private void InitData()
        {
            Cursor.Current       = Cursors.WaitCursor;
            dtpkActiveDate.Value = DateTime.Now;

            //Service
            Result result = ServicesBus.GetServicesList(ServiceType.CanLamSang);

            if (!result.IsOK)
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("ServicesBus.GetServicesList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesList"));
                return;
            }
            else
            {
                cboService.DataSource = result.QueryResult;
            }

            DisplayDocStaffList();

            btnAdd.Enabled = Global.AllowAddLoiKhuyen;
        }
Exemplo n.º 10
0
        private void OnDisplayServicesList()
        {
            lock (ThisLock)
            {
                if (!_isViewAllDichVuHopDong)
                {
                    Result result = null;

                    if (!_isDichVuCon)
                    {
                        if (!_isServiceGroup)
                        {
                            result = ServicesBus.GetServicesListNotInCheckList(_contractGUID, _companyMemberGUID, _name);
                        }
                        else
                        {
                            result = ServiceGroupBus.GetServiceListNotInGroup(_name);
                        }
                    }
                    else if (_isDichVuHopDong)
                    {
                        result = ServicesBus.GetDichVuHopDongList(_name, _contractGUID);
                    }
                    else
                    {
                        result = ServicesBus.GetServicesList(_name);
                    }

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

                            DataTable dt = result.QueryResult as DataTable;
                            dt           = GetDataSource(dt);
                            if (_dtTemp == null)
                            {
                                _dtTemp = dt.Clone();
                            }
                            UpdateChecked(dt);
                            dgService.DataSource = dt;
                        }));
                    }
                    else
                    {
                        MsgBox.Show(Application.ProductName, result.GetErrorAsString("ServicesBus.GetServicesListNotInCheckList"), IconType.Error);
                        Utility.WriteToTraceLog(result.GetErrorAsString("ServicesBus.GetServicesListNotInCheckList"));
                    }
                }
                else
                {
                    dgService.Invoke(new MethodInvoker(delegate()
                    {
                        ClearData();

                        DataTable dt = _giaDichVuDataSource.Copy();
                        if (_dtTemp == null)
                        {
                            _dtTemp = dt.Clone();
                        }
                        UpdateChecked(dt);
                        dgService.DataSource = dt;
                    }));
                }
            }
        }