public IHttpActionResult Register(DTO.Patients1 p) { bool b = Bl.PatientsBl.Register(p); if (b == true) { return(Ok(b)); } return(BadRequest("not register please try again!")); }
//-----------methodes => converts----------- public static Patients Todal(Patients1 p) { return(new Dal.Patients { PatientId = p.PatientId, Firstname = p.Firstname, Lastname = p.Lastname, PatientTz = p.PatientTz, DateOfBirth = p.DateOfBirth, Email = p.Email, Password = p.Password, PhoneNumber1 = p.PhoneNumber1, PhoneNumber2 = p.PhoneNumber2 }); }
public IHttpActionResult UpdatePatient(DTO.Patients1 p) { return(Ok(Bl.PatientsBl.UpdatePatient(p))); }
public static bool UpdatePatient(DTO.Patients1 p) { return(Dal.PatientsDal.UpdatePatient(Patients1.Todal(p))); }