예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public void DeleteDoctor(int id, string connectionString)
 {
     DoctorsDA.DeleteDoctor(id, connectionString);
 }
예제 #4
0
 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);
 }