private void PatienInfo_Load(object sender, EventArgs e) { //LOCK OUR TEXT BOXES Block_or_Unlock_Textbox(false); Hide_Show_Buttons(false); currentPatient = new PatientDTO(); ptnBus = new PatientBUS(); geoBUS = new GeoInfo_BUS(); currentPatient = null; Province_Suggest(); provinceTxt.SelectedIndex = -1; townTxt.Text = ""; districtTxt.Text = ""; }
private void MedicalRecord_Load(object sender, EventArgs e) { InitializeDB(); Insert_Value_Usage(); medBus = new MedicineBUS(); patBus = new PatientBUS(); treatBus = new TreatmentBUS(); medReBUS = new MedicalRecord_BUS(); Bill_BUS = new bill_BUS(); billItem_BUS = new billItem_BUS(); dateEdit1.DateTime = DateTime.Today; get_patientnname(); get_disease(); get_symtom(); dateEdit1.Enabled = false; disCmb.SelectedIndex = -1; nameCmb.SelectedIndex = -1; }
private void btnCreate_Click(object sender, RoutedEventArgs e) { Patient p = new Patient(); p.name = txtHoTen.Text; p.sex = cboGioiTinh.SelectedIndex; p.yob = Convert.ToInt32(txtNamSinh.Text); p.address = txtDiaChi.Text; PatientBUS patientBUS = new PatientBUS(); try { int id = patientBUS.insertPatient(p); MessageBox.Show("Them benh nhan thanh cong"); Close(); } catch { MessageBox.Show("Them benh nhan that bai"); } }