public DoctorModel GetDoctorByCriteria(DoctorModel doctor, string connectionString) { DoctorModel doctorDetails = new DoctorModel(); DataSet ds = DoctorsDA.GetDoctorsByCriteria(doctor.Id, doctor.Name, doctor.Designation, doctor.SearchText, doctor.Password, connectionString); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { return(GetDoctorFromDataRow(ds.Tables[0].Rows[0])); } return(doctorDetails); }
public List <DoctorModel> GetDoctorsByCriteria(DoctorModel doctor, string connectionString) { List <DoctorModel> doctorsList = new List <DoctorModel>(); DataSet ds = DoctorsDA.GetDoctorsByCriteria(doctor.Id, doctor.Name, doctor.Designation, doctor.SearchText, doctor.Password, connectionString); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { return(GetDoctorFromDataTable(ds.Tables[0])); } return(doctorsList); }
public void DeleteDoctor(int id, string connectionString) { DoctorsDA.DeleteDoctor(id, connectionString); }
public void UpdateDoctor(DoctorModel doctor, string connectionString) { DoctorsDA.UpdateDoctor(doctor.Id, doctor.Name, doctor.Password, doctor.Designation, doctor.DateOfBirth, doctor.Number, doctor.Email, doctor.Experience, doctor.Address, connectionString); }