コード例 #1
0
        private void GHbutton_Click(object sender, EventArgs e)
        {
            string   keshi  = comboBox1.Text;
            DateTime day    = dateTimePicker1.Value;
            string   day1   = day.Year + "/" + day.Month + "/" + day.Day + " 00:00:00";
            DateTime day2   = Convert.ToDateTime(day1);
            string   time   = comboBox2.Text;
            string   doctor = comboBox3.Text;
            int      flag   = new PatientBLL().GH(keshi, doctor, day, time);

            if (flag == 1)
            {
                int q = new QueBLL().Que(keshi, doctor, day, time);
                MessageBox.Show("挂号成功!你在" + keshi + day.Month + "月" + day.Day + "日" + time + "的位置是第" + q + "位");
                DataTable dt0 = new PatientBLL().GetHistory();
                dataGridView1.DataSource = dt0;
                textBox3.DataBindings.Clear();
                textBox4.DataBindings.Clear();
                textBox5.DataBindings.Clear();
                textBox6.DataBindings.Clear();
                textBox7.DataBindings.Clear();
                textBox3.DataBindings.Add("Text", dt0, "科室", true);
                textBox4.DataBindings.Add("Text", dt0, "医生", true);
                textBox5.DataBindings.Add("Text", dt0, "日期", true);
                textBox6.DataBindings.Add("Text", dt0, "时间段", true);
                textBox7.DataBindings.Add("Text", dt0, "是否完成", true);
            }
        }
コード例 #2
0
        public ActionResult Create([Bind(Include = "Id,Name,ClientId,Gender,ImagePath")] Patient patient, HttpPostedFileBase file)
        {
            if (ModelState.IsValid && patient.Name != null && patient.Gender != 0)
            {
                var patientBll = new PatientBLL();

                if (file != null && file.ContentLength > 0)
                {
                    string filename = Path.GetFileName(file.FileName);
                    string imgpath  = Path.Combine(Server.MapPath("~/Content/PatientImages/"), filename);
                    file.SaveAs(imgpath);
                    patient.ImgPath = "~/Content/PatientImages/" + file.FileName;
                }
                else
                {
                    patient.ImgPath = "~/Content/PatientImages/default.jpg";
                }

                patientBll.Insert(patient);
                return(RedirectToAction("Index"));
            }
            var clientBll = new ClientBLL();

            ViewBag.ClientId = new SelectList(clientBll.List(), "Id", "FullName", patient.ClientId);
            return(View(patient));
        }
コード例 #3
0
        private void showData()
        {
            var patients = PatientBLL.Search(pageIndex, pageSize, sortBy, sortOrder, keyword);

            dgEmployees.ItemsSource = patients.Items;
            pageCount = patients.PageCount;
        }
コード例 #4
0
        public ActionResult DeleteConfirmed(int id)
        {
            var patientBll = new PatientBLL();

            patientBll.Delete(id);
            return(RedirectToAction("Index"));
        }
コード例 #5
0
ファイル: main.cs プロジェクト: roytaner/ZebraPrinter
        public main()
        {
            InitializeComponent();

            printBLL   = new PatientPrintBLL();
            patientBLL = new PatientBLL(printBLL);
        }
コード例 #6
0
 public RegisterForm()
 {
     InitializeComponent();
     _patientBLL = new PatientBLL();
     _userBLL    = new UserLoginBLL();
     _user       = new UserLogin();
     _identity   = new List <long>();
     _mail       = new List <string>();
     DateControl();
 }
コード例 #7
0
        private void PatientForm_Load(object sender, EventArgs e)
        {
            dateTimePicker1.MinDate = DateTime.Now;
            DateTime now = DateTime.Now;

            dateTimePicker1.Value = now;
            string nows = "";

            if (now.Hour < 12 && now.Hour > 7)
            {
                nows = " 早上好";
            }
            else if (now.Hour < 14)
            {
                nows = " 中午好";
            }
            else if (now.Hour < 18)
            {
                nows = " 下午好";
            }
            else
            {
                nows = " 晚上好";
            }
            label6.Text = new PatientBLL().GetUserName() + nows;
            DataTable dt0 = new PatientBLL().GetHistory();

            dataGridView1.DataSource = dt0;
            DataTable dt = new PatientBLL().GetKeshi();

            string[] keshi = new string[dt.Rows.Count];
            int      i     = 0;

            foreach (DataRow row in dt.Rows)
            {
                keshi[i] = row["Keshi"].ToString().Replace(" ", "");
                i++;
            }
            foreach (string x in keshi)
            {
                comboBox1.Items.Add(x);
            }
            dateTimePicker1.Enabled = true;
            textBox3.DataBindings.Clear();
            textBox4.DataBindings.Clear();
            textBox5.DataBindings.Clear();
            textBox6.DataBindings.Clear();
            textBox7.DataBindings.Clear();
            textBox3.DataBindings.Add("Text", dt0, "科室", true);
            textBox4.DataBindings.Add("Text", dt0, "医生", true);
            textBox5.DataBindings.Add("Text", dt0, "日期", true);
            textBox6.DataBindings.Add("Text", dt0, "时间段", true);
            textBox7.DataBindings.Add("Text", dt0, "是否完成", true);
        }
コード例 #8
0
        private void RegisterHistory_Load(object sender, EventArgs e)
        {
            hScrollBar1.SmallChange = 20;
            DataTable dt = new PatientBLL().GetHistory();

            dataGridView1.DataSource = dt;
            textBox1.DataBindings.Add("Text", dt, "科室", true);
            textBox2.DataBindings.Add("Text", dt, "医生", true);
            textBox3.DataBindings.Add("Text", dt, "日期", true);
            textBox4.DataBindings.Add("Text", dt, "时间段", true);
            textBox5.DataBindings.Add("Text", dt, "是否完成", true);
        }
コード例 #9
0
        // GET: Patients/Details/5
        public ActionResult Details(int id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var     patientBll = new PatientBLL();
            Patient patient    = patientBll.GetById(id);

            if (patient == null)
            {
                return(HttpNotFound());
            }
            return(View(patient));
        }
コード例 #10
0
        private void DoctorInForm2_Load(object sender, EventArgs e)
        {
            byte[]       b   = new DoctorBLL().GetImage(2);
            MemoryStream ms  = new MemoryStream(b);
            Image        img = Image.FromStream(ms);

            pictureBox1.Image = img;

            string [] infor = new DoctorBLL().GetInformation();

            label2.Text       = infor[0];
            label3.Text       = infor[1];
            richTextBox1.Text = infor[2];
            richTextBox2.Text = infor[3];
            label9.Text       = infor[5];
            int i = new PatientBLL().GetPinjia(infor[4]);

            if (i == 1)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
            }
            else if (i == 2)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
            }
            else if (i == 3)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
                pictureBox4.Image = System.Properties.Resources.star_on;
            }
            else if (i == 4)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
                pictureBox4.Image = System.Properties.Resources.star_on;
                pictureBox5.Image = System.Properties.Resources.star_on;
            }
            else if (i == 5)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
                pictureBox4.Image = System.Properties.Resources.star_on;
                pictureBox5.Image = System.Properties.Resources.star_on;
                pictureBox6.Image = System.Properties.Resources.star_on;
            }
        }
コード例 #11
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dt0 = new PatientBLL().GetHistory();

            dataGridView1.DataSource = dt0;
            textBox3.DataBindings.Clear();
            textBox4.DataBindings.Clear();
            textBox5.DataBindings.Clear();
            textBox6.DataBindings.Clear();
            textBox7.DataBindings.Clear();
            textBox3.DataBindings.Add("Text", dt0, "科室", true);
            textBox4.DataBindings.Add("Text", dt0, "医生", true);
            textBox5.DataBindings.Add("Text", dt0, "日期", true);
            textBox6.DataBindings.Add("Text", dt0, "时间段", true);
            textBox7.DataBindings.Add("Text", dt0, "是否完成", true);
        }
コード例 #12
0
        private void DForm3_Load(object sender, EventArgs e)
        {
            User.temp1 = User.uid;
            byte[]       b   = new DoctorBLL().GetImage(1);
            MemoryStream ms  = new MemoryStream(b);
            Image        img = Image.FromStream(ms);

            pictureBox1.Image = img;

            label2.Text       = new DoctorBLL().GetName();
            label3.Text       = new DoctorBLL().GetJob();
            label5.Text       = new DoctorBLL().GetTotal().ToString();
            richTextBox1.Text = new DoctorBLL().GetJianjie();
            richTextBox2.Text = new DoctorBLL().GetGoodat();
            int i = new PatientBLL().GetPinjia();

            if (i == 1)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
            }
            else if (i == 2)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
            }
            else if (i == 3)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
                pictureBox4.Image = System.Properties.Resources.star_on;
            }
            else if (i == 4)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
                pictureBox4.Image = System.Properties.Resources.star_on;
                pictureBox5.Image = System.Properties.Resources.star_on;
            }
            else if (i == 5)
            {
                pictureBox2.Image = System.Properties.Resources.star_on;
                pictureBox3.Image = System.Properties.Resources.star_on;
                pictureBox4.Image = System.Properties.Resources.star_on;
                pictureBox5.Image = System.Properties.Resources.star_on;
                pictureBox6.Image = System.Properties.Resources.star_on;
            }
        }
コード例 #13
0
 public void InsertPatient(Patient patient)
 {
     try
     {
         PatientBLL patientBll = new PatientBLL();
         int        result     = patientBll.InsertPatient(patient);
         if (result > 0)
         {
             MessageBox.Show("Insert Successfully");
             ClearPatient(patient);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #14
0
        private void comboBox1_TextChanged(object sender, EventArgs e)
        {
            dateTimePicker1.Enabled = true;
            comboBox2.Enabled       = true;
            comboBox3.Items.Clear();
            comboBox2.Text = "";

            string    keshi = comboBox1.Text;
            DataTable dt    = new PatientBLL().GetKeshiFen(keshi);

            dataGridView2.DataSource = dt;
            textBox1.DataBindings.Clear();
            textBox2.DataBindings.Clear();

            textBox1.DataBindings.Add("Text", dt, "科室", true);
            textBox2.DataBindings.Add("Text", dt, "医生", true);
        }
コード例 #15
0
        private void DoctorInForm_Load(object sender, EventArgs e)
        {
            DataTable dt = new PatientBLL().GetKeshi();

            string[] keshi = new string[dt.Rows.Count];
            int      i     = 0;

            foreach (DataRow row in dt.Rows)
            {
                keshi[i] = row["Keshi"].ToString().Replace(" ", "");
                i++;
            }
            foreach (string x in keshi)
            {
                comboBox1.Items.Add(x);
            }
        }
コード例 #16
0
        // GET: Patients/Edit/5
        public ActionResult Edit(int id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var     patientBll = new PatientBLL();
            Patient patient    = patientBll.GetById(id);

            if (patient == null)
            {
                return(HttpNotFound());
            }
            var clientBll = new ClientBLL();

            ViewBag.ClientId = new SelectList(clientBll.List(), "Id", "FullName", patient.ClientId);
            return(View(patient));
        }
コード例 #17
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("确定评分:" + label7.Text + " 吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.OK)
     {
         string keshi = textBox1.Text.Replace(" ", "");
         if (keshi == "")
         {
             MessageBox.Show("未选择需要评价的记录!");
             return;
         }
         string   name = textBox2.Text;
         DateTime day  = Convert.ToDateTime(textBox3.Text);
         string   time = textBox4.Text.Replace(" ", "");
         string   ok   = textBox5.Text.Replace(" ", "");
         string   sfen = label7.Text;
         int      fen  = Convert.ToInt32(sfen[0].ToString());
         if (ok == "no")
         {
             MessageBox.Show("请诊断完成后再评分!");
             return;
         }
         if (ok == "cancel")
         {
             MessageBox.Show("取消的挂号不可评分!");
             return;
         }
         if (ok == "yes")
         {
             int flag = new PatientBLL().Pinjia(keshi, name, day, time, fen);
             if (flag == 1)
             {
                 MessageBox.Show("评分成功!");
             }
             else if (flag == 0)
             {
                 MessageBox.Show("重复评分!");
             }
             else if (flag == -1)
             {
                 MessageBox.Show("评分失败!");
             }
         }
     }
 }
コード例 #18
0
        private void button3_Click(object sender, EventArgs e)
        {
            string ok = textBox7.Text.Replace(" ", "");

            if (ok == "yes")
            {
                MessageBox.Show("无需取消挂号!");
                return;
            }
            else if (ok == "no")
            {
                string   keshi = textBox3.Text.Replace(" ", "");
                string   name  = textBox4.Text.Replace(" ", "");
                DateTime day   = Convert.ToDateTime(textBox5.Text);
                string   time  = textBox6.Text.Replace(" ", "");
                int      flag  = new PatientBLL().CancelGH(keshi, name, day, time);
                if (flag == 1)
                {
                    MessageBox.Show("取消挂号成功!");
                    DataTable dt0 = new PatientBLL().GetHistory();
                    dataGridView1.DataSource = dt0;
                    textBox3.DataBindings.Clear();
                    textBox4.DataBindings.Clear();
                    textBox5.DataBindings.Clear();
                    textBox6.DataBindings.Clear();
                    textBox7.DataBindings.Clear();
                    textBox3.DataBindings.Add("Text", dt0, "科室", true);
                    textBox4.DataBindings.Add("Text", dt0, "医生", true);
                    textBox5.DataBindings.Add("Text", dt0, "日期", true);
                    textBox6.DataBindings.Add("Text", dt0, "时间段", true);
                    textBox7.DataBindings.Add("Text", dt0, "是否完成", true);
                }
                else if (flag == -1)
                {
                    MessageBox.Show("取消挂号失败!");
                }
            }
            else if (ok == "cancel")
            {
                MessageBox.Show("已经取消挂号!");
                return;
            }
        }
コード例 #19
0
        private void comboBox1_TextChanged(object sender, EventArgs e)
        {
            comboBox2.Enabled = true;
            comboBox2.Text    = "";
            string    keshi = comboBox1.Text.Replace(" ", "");
            DataTable dt    = new PatientBLL().GetDoctor(keshi, 1);

            comboBox2.Items.Clear();
            string[] doctor = new string[dt.Rows.Count];
            int      i      = 0;

            foreach (DataRow row in dt.Rows)
            {
                doctor[i] = row["Name"].ToString().Replace(" ", "");
                i++;
            }
            foreach (string x in doctor)
            {
                comboBox2.Items.Add(x);
            }
        }
コード例 #20
0
        private void comboBox2_TextChanged(object sender, EventArgs e)
        {
            comboBox3.Items.Clear();
            string    k  = comboBox1.Text;
            string    t  = comboBox2.Text;
            DataTable dt = new PatientBLL().GetDoctor(k, t);

            string[] names = new string[dt.Rows.Count];
            int      i     = 0;

            foreach (DataRow row in dt.Rows)
            {
                names[i] = row["Name"].ToString().Replace(" ", "");
                i++;
            }
            foreach (string x in names)
            {
                comboBox3.Items.Add(x);
            }
            comboBox3.Enabled = true;
        }
コード例 #21
0
        private IEnumerable <Patient> GetPatients()
        {
            PatientBLL patientBll = new PatientBLL();

            return(patientBll.RetrieveAllPatints());
        }
コード例 #22
0
        // GET: Patients
        public ActionResult Index()
        {
            var patientBll = new PatientBLL();

            return(View(patientBll.List()));
        }
コード例 #23
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            DataTable dt0 = new PatientBLL().GetHistory();

            dataGridView1.DataSource = dt0;
        }
コード例 #24
0
        private void tsSave_Click(object sender, EventArgs e)
        {
            List <LabTest>   assignedLabTest2nd = new List <LabTest>();
            InjectionLabTest inLb = new InjectionLabTest();

            inLb.TokenDate = System.DateTime.Today;
            GetNextTokenNumber2nd();
            inLb.TokenNumber = Convert.ToInt64(this.lblCurrentTokenNumber2nd.Text.Trim());
            if (rbInjection.Checked == true)
            {
                inLb.IsInjectionToken = true;
                inLb.InjectionId      = ((LabTest)this.cbxRs10.SelectedItem).LabTestId;
                inLb.Patient.Address  = ((LabTest)this.cbxRs10.SelectedItem).TestName;
                inLb.Type             = 0;
                if (chxSyringe.Checked)
                {
                    defaultSyring.CurrentAmount = 0;
                    inLb.Injections.Add(defaultSyring);
                }
                LabTest defaultInjection = ((LabTest)this.cbxRs10.SelectedItem);
                defaultInjection.CurrentAmount = 10;
                inLb.Injections.Add(defaultInjection);
            }
            else
            {
                //lab test token
                inLb.IsInjectionToken = false;
                if (rbDeserving.Checked == true)
                {
                    inLb.Type = PatientPayType.Deserving;
                }
                else if (rbGeneral2nd.Checked == true)
                {
                    inLb.Type = PatientPayType.General;
                }
                else if (rbPoor.Checked == true)
                {
                    inLb.Type = PatientPayType.Poor;
                }
                else if (rbYCOD.Checked == true)
                {
                    inLb.Type = PatientPayType.YCOD;
                }


                if (lstLabTest.Items.Count > 0)
                {
                    foreach (LabTest item in lstLabTest.Items)
                    {
                        inLb.Tests.Add(item);
                        if (item.IsMedicine == false)
                        {
                            assignedLabTest2nd.Add(item);
                        }
                    }
                }
            }
            Int64 exTokNo = 0;

            Int64.TryParse(txtExistingToken.Text, out exTokNo);
            inLb.ExistingTokenNo          = exTokNo;
            inLb.CashReceived             = Convert.ToDouble(this.txtCashRecieved2nd.Text.Trim());
            inLb.Patient.FirstName        = this.txtPatientFirstName2nd.Text;
            inLb.Patient.LastName         = this.txtPatientLastName2nd.Text;
            inLb.Patient.NIC              = this.txtPatientCNIC2nd.Text;
            inLb.Patient.RegistrationDate = this.dtpPatientRegistration2nd.Value.Date;

            inLb.Patient.RegistrationNumber = this.txtPateintRegistrationNumber2nd.Text;
            //inLb.Patient.Address = this.txtPatientAddress2nd.Text;
            inLb.TokenMonthYear = Convert.ToInt64(DateTime.Today.Month.ToString() + DateTime.Today.Year.ToString());
            // inLb.Patient.Member = cbxmembers.Text.Trim();

            try
            {
                if (inLabBll.SavePatientToken(inLb))
                {
                    if (assignedLabTest2nd.Count > 0)
                    {
                        PatientBLL pbll = new PatientBLL();
                        pbll.LabTestAssignedPaid(inLb, assignedLabTest2nd);
                    }
                    if (inLb.IsInjectionToken)
                    {
                        PrintPreviewInjection(false, inLb);
                    }
                    else
                    {
                        PrintPreviewLab(false, inLb);
                    }
                    GetNextTokenNumber2nd();
                    NewPatient2nd();
                    MessageBox.Show("Patient Registered Successfully", "Token Granted");
                    this.txtPatientFirstName2nd.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Save Patient Registration Error");
            }
        }
コード例 #25
0
 public RegisterForm(int id)
 {
     _patientBLL = new PatientBLL();
     _userBLL    = new UserLoginBLL();
     _user       = _userBLL.GetUserLogin(id);
 }
コード例 #26
0
        public IEnumerable <ConfigurationDetail> GetGender()
        {
            PatientBLL patientBll = new PatientBLL();

            return(patientBll.RetrieveAllGenders());
        }