Ejemplo n.º 1
0
 public DepartmentMemberAddEditDTO(Guid departmentID, Guid?userId)
 {
     this.DepartmentID = departmentID;
     this.UserID       = userId ?? Guid.Empty;
     using (LURowService luRowService = new LURowService())
         this.Roles = userId.HasValue ?
                      new DepartmentMemberService().GetList(this.DepartmentID, null, this.UserID)
                      .Select(c => new QueryModel(c.RoleLU.ToString(), luRowService.GetNameOfByAlias("DepartmentRoleLU", c.RoleLU.ToString()))).ToList() : new List <QueryModel>();
 }
        public object GetPagesForMenu()
        {
            List <sysBpmsApplicationPage> list = new ApplicationPageEngine(new EngineSharedModel(Guid.Empty, null, this.ClientUserName, "")).GetAvailable(null, this.ClientUserName, true);

            using (LURowService luRowService = new LURowService())
                return(list.GroupBy(c => c.GroupLU).Select(c => new
                {
                    Group = c.Key,
                    GroupName = luRowService.GetNameOfByAlias(sysBpmsLUTable.e_LUTable.ApplicationPageGroupLU.ToString(), c.Key.ToString()),
                    List = c.ToList().Select(d => new
                    {
                        d.ID,
                        Name = d.DynamicForms.FirstOrDefault()?.Name ?? "no page"
                    }),
                }).ToList());
        }