public EditPatientPage(patient patientToEdit) { InitializeComponent(); _patientToEdit = patientToEdit; gridPatientToEdit.DataContext = _patientToEdit; }
internal static void UpdatePatient(patient patientToUpdate) { stromohabDevEntities db = new stromohabDevEntities(); var dbPatientInfo = db.patients .Where(w => w.idPatient == patientToUpdate.idPatient) .SingleOrDefault(); if (dbPatientInfo != null) { dbPatientInfo.idPatient = patientToUpdate.idPatient; dbPatientInfo.pContactNumber = patientToUpdate.pContactNumber; dbPatientInfo.pDateOfBirth = patientToUpdate.pDateOfBirth; dbPatientInfo.pFirstName = patientToUpdate.pFirstName; dbPatientInfo.pGender = patientToUpdate.pGender; dbPatientInfo.pLastName = patientToUpdate.pLastName; db.SaveChanges(); } }
/// <summary> /// Updates the given patient in the Stromohab system. /// </summary> /// <param name="patientToEdit">the patient to overwrite into the system.</param> public static void UpdatePatient(patient patientToEdit) { Patients.UpdatePatient(patientToEdit); }
/// <summary> /// Updates the given patient in the Stromohab system. /// </summary> /// <param name="patientToEdit">the patient to overwrite into the system.</param> public static void UpdatePatient(patient patientToEdit) { Patients.UpdatePatient(patientToEdit); }
/// <summary> /// Create a new patient object. /// </summary> /// <param name="clinicians_cUserName">Initial value of the Clinicians_cUserName property.</param> /// <param name="idPatient">Initial value of the idPatient property.</param> /// <param name="pDateOfBirth">Initial value of the pDateOfBirth property.</param> /// <param name="pFirstName">Initial value of the pFirstName property.</param> /// <param name="pGender">Initial value of the pGender property.</param> /// <param name="pLastName">Initial value of the pLastName property.</param> public static patient Createpatient(global::System.String clinicians_cUserName, global::System.Int32 idPatient, global::System.DateTime pDateOfBirth, global::System.String pFirstName, global::System.String pGender, global::System.String pLastName) { patient patient = new patient(); patient.Clinicians_cUserName = clinicians_cUserName; patient.idPatient = idPatient; patient.pDateOfBirth = pDateOfBirth; patient.pFirstName = pFirstName; patient.pGender = pGender; patient.pLastName = pLastName; return patient; }
/// <summary> /// Deprecated Method for adding a new object to the patients EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTopatients(patient patient) { base.AddObject("patients", patient); }
internal static string PatientLastNameFromPatientId(int patientId) { patient ctx = SelectPatientFromPatientId(patientId); return(ctx.pLastName); }
/// <summary> /// Deprecated Method for adding a new object to the patients EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTopatients(patient patient) { base.AddObject("patients", patient); }