/// <summary> /// Updates Patient's info based on input as User's info and Patient's info /// </summary> /// <param name="user"></param> /// <param name="patient"></param> /// <returns>Falg as true if updated successfully else false</returns> public bool UpdatePatient(Users user, Patients patient) { try { user.Password = encrypt.Encrypt(user.Password); PatientEditRemove patientEdit = new PatientEditRemove(); return(patientEdit.EditPatient(user, patient)); } catch (EmailAlreadyExistsEx ex) { throw ex; } catch (PhoneAlreadyExistsEx ex) { throw ex; } catch (Exception e) { throw e; } }
/// <summary> /// Deletes the Patient from Database based on the UserId. /// </summary> /// <param name="id"></param> /// <returns>Flag as true if deleted successfully else false</returns> public bool DeletePatient(int id) { PatientEditRemove patientRemove = new PatientEditRemove(); return(patientRemove.RemovePatient(id)); }