// // GET: /Doctor/ public ActionResult Index(DoctorviewModel model) { ModelState.Clear(); var totalrecords = 0; model.Name = model.SearchbyName; model.RegistrationNo = model.SearchByRegistrationNumber; model.DoctorsDesignations = DoctorDesignationManager.GetAllDesignation(); model.Genders = GenderManager.GetAllGenderTitle(); model.Doctors = DoctorManager.GetAllDoctorByPaging(out totalrecords, model); //.Where(x=>(x.Name==model.Name||model.Name==null)&&(x.RegistrationNo==model.RegistrationNo||model.RegistrationNo==null)&&(x.GenderId==model.GenderId||model.GenderId==0)&&(x.DessignationId==model.DessignationId||model.DessignationId==0)).ToList(); model.TotalRecords = totalrecords; return(View(model)); }
public ActionResult Edit(DoctorviewModel model) { model.Genders = GenderManager.GetAllGenderTitle(); model.DoctorsDesignations = DoctorDesignationManager.GetAllDesignation(); if (model.DoctorId > 0) { Doctor doctor = DoctorManager.GetDoctorById(model.DoctorId); model.DoctorId = doctor.DoctorId; model.GenderId = doctor.GenderId; model.DessignationId = doctor.DessignationId; model.Name = doctor.Name; model.RegistrationNo = doctor.RegistrationNo; model.Adress = doctor.Adress; model.Contact = doctor.Contact; model.Email = doctor.Email; model.Website = doctor.Website; model.FacebookId = doctor.FacebookId; model.Twitter = doctor.Twitter; } return(View(model)); }