コード例 #1
0
ファイル: BenhDAO.cs プロジェクト: minhkkhang/QuanLyPhongKham
        public static bool removeBenh(String loai)
        {
            Benh benh = null;

            using (var context = new DataModel())
            {
                benh = context.Benhs.Find(loai);
                context.Benhs.Remove(benh);
                context.SaveChanges();
            }
            return(benh == null);
        }
コード例 #2
0
        private void ThemBenhBtn_Click(object sender, RoutedEventArgs e)
        {
            Benh           benh   = new Benh();
            ThemBenhDialog dialog = new ThemBenhDialog(benh, false);

            if (dialog.ShowDialog() == true)
            {
                int res = Bussiness.addOrUpdateBenh(benh.LoaiBenh, benh.TrieuChung);
                if (res == 1)
                {
                    benhs.Add(benh.LoaiBenh);
                }
            }
        }
コード例 #3
0
        private void BenhComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (Bussiness.currentLuotKhamID == -1)
            {
                return;
            }
            if ((BenhComboBox.SelectedItem as string).Equals("unidentified"))
            {
                Bussiness.updateLuotKham(Bussiness.currentLuotKhamID, "unidentified");
            }
            Benh benh = BenhDAO.getBenh(BenhComboBox.SelectedItem as string);

            TrieuChungTxtBlock.Text = benh.TrieuChung;
            Bussiness.updateLuotKham(Bussiness.currentLuotKhamID, benh.LoaiBenh);
        }
コード例 #4
0
ファイル: BenhDAO.cs プロジェクト: minhkkhang/QuanLyPhongKham
 public static bool containsSymptom(Benh benh, String trieuchung)
 {
     return(benh.TrieuChung.Contains(trieuchung));
 }