public List <ClincDescription> GetAllCDE(out int totalrecords, ClincDescription model) { List <ClincDescription> clincDescriptions; try { clincDescriptions = _clinicDescriptionRepository.GetAllCDE(out totalrecords, model); } catch (Exception exception) { throw new Exception(exception.Message); } return(clincDescriptions); }
public int Save(ClincDescription cl) { int saveIndex = 0; try { cl.IsActive = true; saveIndex = _clinicDescriptionRepository.Save(cl); } catch (Exception exception) { throw new Exception(exception.Message); } return(saveIndex); }
public int Delete(int id) { int deleteIndex = 0; try { ClincDescription clinic = GetClinicById(id); clinic.IsActive = false; deleteIndex = _clinicDescriptionRepository.Edit(clinic); } catch (Exception exception) { throw new Exception(exception.Message); } return(deleteIndex); }
public ActionResult Edit(ClinicDetailsViewModel model) { if (model.ClinicDescriptionId > 0) { ClincDescription cl = ClinicDescriptionManager.GetClinicById(model.ClinicDescriptionId); model.ClinicDescriptionId = cl.ClinicDescriptionId; model.Name = cl.Name; model.ClinicType = cl.ClinicType; model.Address = cl.Address; model.ClinicContact = cl.ClinicContact; model.ClinicMail = cl.ClinicMail; model.websilte = cl.websilte; } return(View(model)); }
public int Edit(ClincDescription cl) { int editIndex = 0; try { ClincDescription _cl = GetClinicById(cl.ClinicDescriptionId); _cl.ClinicDescriptionId = cl.ClinicDescriptionId; _cl.Name = cl.Name; _cl.ClinicType = cl.ClinicType; _cl.ClinicContact = cl.ClinicContact; _cl.Address = cl.Address; _cl.ClinicMail = cl.ClinicMail; _cl.websilte = cl.websilte; editIndex = _clinicDescriptionRepository.Edit(_cl); } catch (Exception exception) { throw new Exception(exception.Message); } return(editIndex); }
public JsonResult Save(ClinicDetailsViewModel model) { int saveIndex = 0; ClincDescription cl = new ClincDescription(); cl.ClinicDescriptionId = model.ClinicDescriptionId; cl.Name = model.Name; cl.ClinicType = model.ClinicType; cl.Name = model.Name; cl.ClinicContact = model.ClinicContact; cl.Address = model.Address; cl.ClinicMail = model.ClinicMail; cl.websilte = model.websilte; saveIndex = model.ClinicDescriptionId == 0 ? ClinicDescriptionManager.Save(cl) : ClinicDescriptionManager.Edit(cl); return(Reload(saveIndex)); }