Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 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);
     }
 }
Example #4
0
 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);
     }
 }
Example #5
0
 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);
     }
 }