Example #1
0
 // Assign doctor to order
 public bool AssignDoctorToOrder(TM_DoctorOrder entity)
 {
     try
     {
         db.TM_DoctorOrder.Add(entity);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #2
0
 // Assign a doctor to an order
 public bool AssignDoctorToOrder(int doctorId, long orderId, int patienId)
 {
     try
     {
         TM_DoctorOrder entity = new TM_DoctorOrder();
         entity.DoctorId  = doctorId;
         entity.OrderId   = orderId;
         entity.Status    = false;
         entity.PatientId = patienId;
         db.TM_DoctorOrder.Add(entity);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }