public ePatientOfDay getOnePatientOfDay(int id) { var result = potdal.getOnePartientOfDay(id); ePatientOfDay temp = new ePatientOfDay(); temp.Number = result.Number; temp.PatientID = result.PartientID; temp.RoomID = result.RoomID; return(temp); }
public List <ePatientOfDay> getAllPatientOfDay() { List <ePatientOfDay> ls = new List <ePatientOfDay>(); foreach (PartientOfDay record in potdal.getAllPartientOfDay()) { ePatientOfDay temp = new ePatientOfDay(); temp.Number = record.Number; temp.PatientID = record.PartientID; temp.RoomID = record.RoomID; ls.Add(temp); } return(ls); }
public bool updateParient(ePatientOfDay e) { try { PartientOfDay temp = new PartientOfDay(); temp.Number = e.Number; temp.PartientID = e.PatientID; temp.RoomID = e.RoomID; potdal.updatePartientOfDay(temp); return(true); } catch { return(false); } }
public ePatientOfDay insertPatientOfDay(int id) { try { ePatientOfDay temp = new ePatientOfDay(); PartientOfDay e = potdal.insertPartientOfDay(id); temp.Number = e.Number; temp.PatientID = e.PartientID; temp.RoomID = e.RoomID; temp.Room = getOneRoom(e.RoomID).Room; return(temp); } catch { return(null); } }
public ePatientOfDay insertPatient(ePatient e) { try { Patient temp = new Patient(); temp.Address = e.Address; temp.FirstName = e.FirstName; temp.Gender = Convert.ToBoolean(e.Gender); temp.IdentifyCard = e.IdentifyCard; temp.LastName = e.LastName; temp.MiddleName = e.MiddleName; temp.PatientID = e.PatientID; temp.Phone = e.Phone; patientdal.insertPatient(temp); ePatientOfDay pod = new ePatientOfDay(); pod = insertPatientOfDay(temp.PatientID); return(pod); } catch { return(null); } }