public ActionResult Update(WorkerUpdate model) { var response = new WorkerUpdate() { Client = new List <SelectListItem>(), Project = new List <SelectListItem>(), Location = new List <SelectListItem>(), Role = new List <SelectListItem>() }; return(View(response)); }
public ActionResult Update() { SessionVar.SetLoginUser(new DLL.Login.LoginResponseDTO() { User = new DLL.DB.UserDTO() { UserName = "******" } }); var model = new WorkerUpdate() { Client = new List <SelectListItem>(), Project = new List <SelectListItem>(), Location = new List <SelectListItem>(), Role = new List <SelectListItem>() }; model.Client.Add(new SelectListItem() { Text = Strings.SelectOption }); try { var invoker = new Invoker <List <DLL::CatalogsDTO>, bool>(new CompanyCaller <List <DLL::CatalogsDTO>, bool>()); var response = invoker.GetAll(new DLL::RequestDTO <bool>() { Signature = true }); foreach (DLL::CatalogsDTO item in response.Result) { model.Client.Add(new SelectListItem() { Text = item.Name, Value = item.Id.ToString() }); } } catch (System.Exception ex) { DLLS::ExceptionHandler.Instance.WriteExceptionLog(ex); model.Message = Key.GetError(); } return(View(model)); }