protected bool Update(string patient_id, string username, string password, string firstname, string lastname, string nickname, string birth, string gender, string address, string email, string tel, string id_card, string chronicd, string bloodtype, string rh, string allergydrug, string cousin, string cousintell) { try { MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); m_patient.Patient_id = Convert.ToInt32(patient_id); m_patient.username = username; m_patient.password = password; m_patient.Firstname = firstname; m_patient.Lastname = lastname; m_patient.Nickname = nickname; m_patient.Birth = birth; m_patient.Gender = gender; m_patient.Address = address; m_patient.Email = email; m_patient.Tel = tel; m_patient.Id_card = Convert.ToInt64(id_card); m_patient.ChronicD = chronicd; m_patient.Bloodtype = bloodtype; m_patient.Rh = rh; m_patient.Allergydrug = allergydrug; m_patient.Cousin = cousin; m_patient.Cousintell = cousintell; C_PATIENT c_patient = new C_PATIENT(); c_patient.Updatepatient(m_patient.Patient_id, m_patient.username, m_patient.password, m_patient.Firstname, m_patient.Lastname, m_patient.Nickname, m_patient.Birth, m_patient.Gender, m_patient.Address, m_patient.Email, m_patient.Tel, m_patient.Id_card, m_patient.ChronicD, m_patient.Bloodtype, m_patient.Rh, m_patient.Allergydrug, m_patient.Cousin, m_patient.Cousintell); return(true); } catch (Exception ex) { } return(false); }
public bool AddMedic(int patient_id, string treatdate, Double weight, Double height, int pulse, int respiratory, string bloodpressure, string condition, string treatdetail, int doctor_id) { try { string tbnameAdd = "TREATMENT"; Utilities manage = new Utilities(); MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); Dictionary <String, object> data = new Dictionary <string, object>(); data.Add("Patient_id", patient_id); data.Add("Treatdate", treatdate); data.Add("Weight", weight); data.Add("Height", height); data.Add("Pulse", pulse); data.Add("Respiratory_rate", respiratory); data.Add("Bloodpressure", bloodpressure); data.Add("Condition", condition); data.Add("Treatdetail", treatdetail); data.Add("Doctor_id", doctor_id); manage.InsertData(tbnameAdd, data); return(true); } catch (Exception ex) { return(false); } }
public bool AddAppoint(int patient_id, int doctor_id, string appointdate, string status, string raiseby) { try { string tbnameAdd = "APPOINTMENT"; Utilities manage = new Utilities(); MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); Dictionary <String, object> data = new Dictionary <string, object>(); data.Add("Patient_id", patient_id); data.Add("Doctor_id", doctor_id); data.Add("AppointDate", appointdate); data.Add("Status", status); data.Add("Raiseby", raiseby); manage.InsertData(tbnameAdd, data); return(true); } catch (Exception ex) { return(false); } }
protected bool AddMedic(string patient_id, string treatdate, string weight, string height, string pulse, string respiratory, string bloodpressue, string condition, string treatdetail, string doctor_id) { try { MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); m_patient.Patient_id = Convert.ToInt32(patient_id); m_patient.Treatdate = treatdate; m_patient.Weight = Convert.ToDouble(weight); m_patient.Height = Convert.ToDouble(height); m_patient.Pulse = Convert.ToInt32(pulse); m_patient.Respiratory = Convert.ToInt32(respiratory); m_patient.Bloodpressure = bloodpressure; m_patient.Condition = condition; m_patient.Treatdetail = treatdetail; m_patient.Doctor_id = Convert.ToInt32(doctor_id); C_PATIENT c_patient = new C_PATIENT(); c_patient.AddMedic(m_patient.Patient_id, m_patient.Treatdate, m_patient.Weight, m_patient.Height, m_patient.Pulse, m_patient.Respiratory, m_patient.Bloodpressure, m_patient.Condition, m_patient.Treatdetail, m_patient.Doctor_id); return(true); } catch (Exception ex) { } return(false); }
protected bool Delete(String patient_id) { try { MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); m_patient.Patient_id = Convert.ToInt32(patient_id); C_PATIENT c_patient = new C_PATIENT(); c_patient.deletepatient(m_patient.Patient_id); return(true); } catch (Exception ex) { // this.DBLog(ex.Message, "ERROR"); // this.DBLog(ex.StackTrace, "ERROR"); } return(false); }
protected bool AddAppoint(string patient_id, string doctor_id, string appointdate, string status, string raiseby) { try { MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); m_patient.Patient_id = Convert.ToInt32(patient_id); m_patient.Doctor_id = Convert.ToInt32(doctor_id); m_patient.AppointDate = appointdate; m_patient.Status = "รอตรวจ"; m_patient.Raiseby = raiseby; C_PATIENT c_patient = new C_PATIENT(); c_patient.AddAppoint(m_patient.Patient_id, m_patient.Doctor_id, m_patient.AppointDate, m_patient.Status, m_patient.Raiseby); return(true); } catch (Exception ex) { } return(false); }
public bool AddPatient(string username, string password, string firstname, string lastname, string nickname, string birth, string gender, string address, string email, string tel, Int64 id_card, string chronicd, string bloodtype, string rh, string allergydrug, string cousin, string cousintell) { try { string tbnameAdd = "PATIENT"; Utilities manage = new Utilities(); MANAGE_PATIENT m_patient = new MANAGE_PATIENT(); Dictionary <String, object> data = new Dictionary <string, object>(); data.Add("username", username); data.Add("password", password); data.Add("Firstname", firstname); data.Add("Lastname", lastname); data.Add("Nickname", nickname); data.Add("Birth", birth); data.Add("Gender", gender); data.Add("Address", address); data.Add("Email", email); data.Add("Tel", tel); data.Add("Id_card", id_card); data.Add("ChronicD", chronicd); data.Add("Bloodtype", bloodtype); data.Add("Rh", rh); data.Add("Allergydrug", allergydrug); data.Add("Cousin", cousin); data.Add("Cousintell", cousintell); manage.InsertData(tbnameAdd, data); return(true); } catch (Exception ex) { return(false); } }