コード例 #1
0
        protected WebApiModel.UDSBuildModel MapUDSModel(WebApiModel.UDSBuildModel model, UDSEntityModel entityModel)
        {
            model.Year             = entityModel.Year;
            model.Number           = entityModel.Number;
            model.RegistrationDate = entityModel.RegistrationDate;
            model.LastChangedDate  = entityModel.LastChangedDate;
            model.LastChangedUser  = entityModel.LastChangedUser;
            model.Subject          = entityModel.Subject;
            model.Title            = entityModel.Title;
            model.Category         = entityModel.IdCategory.HasValue ? new CategoryModel(entityModel.IdCategory) : null;
            model.Container        = entityModel.IdContainer.HasValue ? new ContainerModel(entityModel.IdContainer) : null;
            model.Roles            = entityModel.Relations != null?MapUDSRoles(entityModel.Relations.Authorizations) : new List <RoleModel>();

            model.Users     = MapUDSUsers(entityModel.Users);
            model.Documents = entityModel.Relations != null?MapUDSDocuments(entityModel.Relations.Documents) : new List <WebApiModel.UDSDocumentModel>();

            if (model.WorkflowActions == null)
            {
                model.WorkflowActions = new List <IWorkflowAction>();
            }
            model.WorkflowActions = model.WorkflowActions.Concat(MapWorkflowLinkActions(entityModel)).ToList();
            return(model);
        }
コード例 #2
0
 protected void ResetModelXML(WebApiModel.UDSBuildModel currentModel)
 {
     currentModel.XMLContent = string.Empty;
 }