コード例 #1
0
        private void btnAssignTests_Click(object sender, EventArgs e)
        {
            var formContainer = new Form()
            {
                Size          = new Size(850, 600),
                StartPosition = FormStartPosition.CenterParent
            };

            var assignControl = new AssignTests(this.listXetNghiem)
            {
                Dock = DockStyle.Fill
            };

            assignControl.DidAssign += (totalCharge, listTest) =>
            {
                formContainer.Close();

                this.btnCreateMedical.Enabled = false;

                this.totalCharge    = totalCharge;
                this.txtChiPhi.Text = totalCharge + " VNĐ";

                this.panelResult.Height = this.resultSize.Height;

                var testResult = new AssignTestsConfirm(listTest)
                {
                    Dock = DockStyle.Fill
                };

                testResult.ClearEvent += (obj, er) =>
                {
                    this.clearResultGroup();
                };
                this.listXetNghiem = testResult.DanhSachXetNghiem;

                this.groupResult.Controls.Clear();
                this.groupResult.Controls.Add(testResult);
                this.groupResult.Text = "Danh sách xét nghiệm";
            };

            formContainer.Controls.Add(assignControl);
            formContainer.ShowDialog();
        }
コード例 #2
0
        private void fetchData()
        {
            this.txtYeuCauKham.Text = this.hoso.YeuCauKham;
            this.txtChuanDoan.Text  = this.hoso.ChuanDoan;
            this.txtTrieuChung.Text = this.hoso.TrieuChung;
            this.txtPhong.Text      = this.tenPhong;
            this.txtBacSi.Text      = Common.User.SharedInstance.UserName;

            this.patientMainInformation.binding(this.benhNhan);

            if (danhSachThuoc != null)
            {
                var thuocConfirm = new CreatePrescriptionsConfirm(this.danhSachThuoc, true)
                {
                    Dock = DockStyle.Fill
                };

                this.panelResult.Height = this.resultSize.Height;

                this.groupResult.Controls.Clear();
                this.groupResult.Controls.Add(thuocConfirm);
                this.groupResult.Text = "Đơn thuốc";
            }
            else if (danhSachXetNghiem != null)
            {
                var xetNghiemConfirm = new AssignTestsConfirm(this.danhSachXetNghiem, true)
                {
                    Dock = DockStyle.Fill
                };

                this.panelResult.Height = this.resultSize.Height;

                this.groupResult.Controls.Clear();
                this.groupResult.Controls.Add(xetNghiemConfirm);
                this.groupResult.Text = "Danh sách xét nghiệm";
            }
            else
            {
                this.panelResult.Height = 0;
            }
        }