Пример #1
0
        private void HelpBtn_Click(object sender, RoutedEventArgs e)
        {
            TextDialog dialog =
                new TextDialog("Help", "Phan mem quan ly phong kham" + Environment.NewLine
                               + "Nguoi thuc hien: 1712518 - Nguyen Le Minh Khang");

            dialog.ShowDialog();
        }
Пример #2
0
 private void HoaDonBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (DSLuotKhamListView.SelectedIndex == -1)
         {
             return;
         }
         StringBuilder builder = new StringBuilder();
         LuotKham      lk      = LuotKhamDAO
                                 .getLuotKhamBaseOnDateAndPatient(DateTime.Today.ToString("dd/MM/yyyy")
                                                                  , (DSLuotKhamListView.SelectedItem as BenhNhan).CMND);
         builder.Append("-----HOA DON THANH TOAN-----");
         builder.Append(Environment.NewLine);
         builder.Append("Thong tin benh nhan");
         builder.Append(Environment.NewLine);
         BenhNhan bn = BenhNhanDAO.getBenhNhan(lk.BenhNhan);
         builder.Append(">Ho ten: " + bn.HoTen);
         builder.Append(Environment.NewLine);
         builder.Append(">So CMND: " + bn.CMND);
         builder.Append(Environment.NewLine);
         builder.Append("Thong tin kham benh:");
         builder.Append(Environment.NewLine);
         builder.Append(">Ten benh: " + lk.Benh);
         builder.Append(Environment.NewLine);
         builder.Append("Ke toa thuoc:");
         builder.Append(Environment.NewLine);
         ICollection <LuotThuoc> list = lk.LuotThuocs;
         foreach (LuotThuoc lt in list)
         {
             builder.Append(">");
             builder.Append(lt.Thuoc);
             Thuoc thuoc = ThuocDAO.getThuoc(lt.Thuoc);
             builder.Append(" - ");
             builder.Append(lt.SoLuong + " " + thuoc.DonVi);
             builder.Append(" - ");
             builder.Append(lt.ChiPhi + "VND");
             builder.Append(Environment.NewLine);
         }
         builder.Append("---------------------------" + Environment.NewLine);
         builder.Append("Tien kham: " + lk.TienKham);
         builder.Append(" + Tien thuoc: " + lk.TienThuoc);
         builder.Append(Environment.NewLine);
         builder.Append("Tong chi phi: " + lk.ChiPhi);
         TextDialog dialog = new TextDialog("Hoa don", builder.ToString());
         dialog.ShowDialog();
     }catch (Exception ex) { MessageBox.Show(ex.ToString()); }
 }
Пример #3
0
        private void LichSuXemThuocBtn_Click(object sender, RoutedEventArgs e)
        {
            ICollection <LuotThuoc> list = LuotKhamDAO
                                           .getLuotKham((LichSuKhamListView.SelectedItem as LuotKham).ID).LuotThuocs;
            StringBuilder builder = new StringBuilder();

            builder.Append("Ke toa thuoc: ");
            builder.Append(Environment.NewLine);
            foreach (LuotThuoc lt in list)
            {
                builder.Append(">");
                builder.Append(lt.Thuoc);
                Thuoc thuoc = ThuocDAO.getThuoc(lt.Thuoc);
                builder.Append(" - ");
                builder.Append(lt.SoLuong + " " + thuoc.DonVi);
                builder.Append(" - ");
                builder.Append(lt.ChiPhi + " VND");
                builder.Append(Environment.NewLine);
            }
            TextDialog dialog = new TextDialog("Toa thuoc", builder.ToString());

            dialog.ShowDialog();
        }