Exemplo n.º 1
0
        public virtual ActionResult AddNewContact(string operationNumber, bool onlyRead)
        {
            var model = new OperationContactsViewModel();

            model.OperationNumber = operationNumber ?? IDBContext.Current.Operation;
            var response     = _operationContactsService.GetOperationContacts(operationNumber);
            var eaRoles      = _viewModelMapperHelper.GetListEaRole();
            var institutions = _viewModelMapperHelper.GetInstitutionByOperation(operationNumber);
            var countries    = _viewModelMapperHelper.GetCountryList();

            model.Institution          = institutions.ListItemInstitution;
            model.Country              = countries.CountryList;
            model.EaRole               = eaRoles.EaRole;
            model.OperationContactsRow = response.OperationContacts.OperationContactsRow == null ?
                                         new List <OperationContactsRowViewModel>() :
                                         response.OperationContacts.OperationContactsRow;
            model.OnlyRead = onlyRead;
            return(PartialView("~/Areas/Contacts/Views/Contacts/EditPartial/NewContact.cshtml", model));
        }