Ejemplo n.º 1
0
        public virtual ActionResult ReadControlPanelContact(string operationNumber, int executorContactId, string userName = "")
        {
            var model        = new OperationContactsRowViewModel();
            var response     = _operationContactsService.GetControlPanelContact(operationNumber, executorContactId, userName);
            var eaRoles      = _viewModelMapperHelper.GetListEaRole();
            var institutions = _viewModelMapperHelper.GetAllInstitutions();
            var countries    = _viewModelMapperHelper.GetCountryList();

            model = response.Contact;
            return(PartialView("~/Areas/Contacts/Views/ControlPanelContacts/ReadPartial/ReadControlPanelContacts.cshtml", model));
        }
Ejemplo n.º 2
0
        public virtual ActionResult OperationContacts(string operationNumber)
        {
            var model    = new OperationContactsViewModel();
            var roleUser = _authorizationManager.GetRoles(IDBContext.Current.UserName, operationNumber);

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

            model.Display              = _viewModelMapperHelper.GetDisplayedOptions();
            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            = response.OperationContacts.OnlyRead;
            model.IsEnableAllContacts = response.OperationContacts.IsEnableAllContacts;
            return(PartialView(model));
        }