public ActionResult EditVizier(int id) { var entity = _contactsRepository.GetById(id); if (entity.Id <= 0) { return(ErrorResult(HttpStatusCode.NotFound)); } var model = Mapper.Map <ContactViewModel>(entity); model = BuildModel(model); model.ViewMode = ContactViewModes.Vizier; IEnumerable <VizierType> vvtype = VizierType.GetAll(); model.VizierTypeSelect = new SelectList( vvtype , "Name" // Id , "Name"); return(View("ManagerVizier", model)); }
public ActionResult Add() { var model = new ContactViewModel(); model = BuildModel(model); model.Type = ContactType.Company; IEnumerable <VizierType> vvtype = VizierType.GetAll(); model.VizierTypeSelect = new SelectList( vvtype , "Name" // Id , "Name"); return(View("Manager", model)); }
public ActionResult Modal(ContactType contactType = ContactType.General, ContactViewModes viewMode = ContactViewModes.Full, bool enableTypeModification = false) { var model = new ContactViewModel() { Type = contactType, ViewMode = viewMode, EnableTypeModification = enableTypeModification }; model = BuildModel(model); IEnumerable <VizierType> vvtype = VizierType.GetAll(); model.VizierTypeSelect = new SelectList( vvtype , "Name" // Id , "Name"); return(PartialView(model)); }
public ActionResult AddVizier(ContactViewModes viewMode = ContactViewModes.Vizier, bool enableTypeModification = true) { var model = new ContactViewModel() { //Type = contactType, ViewMode = viewMode, EnableTypeModification = enableTypeModification }; model = BuildModel(model); model.Type = ContactType.VizierUMTOP; IEnumerable <VizierType> vvtype = VizierType.GetAll(); model.VizierTypeSelect = new SelectList( vvtype , "Name" // Id , "Name"); return(View("ManagerVizier", model)); }