Ejemplo n.º 1
0
        static AppDeployNodeController()
        {
            ListFields.RemoveCreateField();
            AddFormFields.RemoveCreateField();

            LogOnChange = true;
        }
Ejemplo n.º 2
0
        static AppController()
        {
            MenuOrder   = 38;
            LogOnChange = true;

            ListFields.RemoveField("Secret", "Logo", "White", "Black", "Urls", "Remark");

            {
                var df = ListFields.AddDataField("AppLog", "Enable");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "AppLog?appId={ID}";
            }

            {
                var df = AddFormFields.AddDataField("RoleIds");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
            }

            {
                var df = EditFormFields.AddDataField("RoleIds");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
            }

            {
                var df = ListFields.AddDataField("Log", "UpdateUserId");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=应用系统&linkId={ID}";
            }
        }
Ejemplo n.º 3
0
        static UserConnectController()
        {
            ListFields.RemoveField("AccessToken");
            ListFields.RemoveField("RefreshToken");
            ListFields.RemoveField("Avatar");

            // 提供者列,增加查询
            {
                var df = ListFields.AddDataField(UserConnect._.Provider);
                df.Url = "?provider={Provider}";
            }

            // 用户列,增加连接
            {
                var df = ListFields.AddDataField("UserName");
                df.Header      = "用户";
                df.HeaderTitle = "对应的本地用户信息";
                df.DisplayName = "{UserName}";
                df.Url         = "User?id={UserID}";
            }

            {
                var df = ListFields.AddDataField("OAuthLog", "Enable");
                df.Header      = "OAuth日志";
                df.DisplayName = "OAuth日志";
                df.Url         = "OAuthLog?connectId={ID}";
            }

            //// 插入一列
            //{
            //    var df = ListFields.AddDataField("用户信息", "CreateUserID");
            //    df.DisplayName = "用户信息";
            //    df.Url = "User?id={UserID}";
            //}
        }
Ejemplo n.º 4
0
        static DeviceOnlineController()
        {
            MenuOrder = 88;

            ListFields.RemoveField("SessionID");
            ListFields.RemoveField("LastError");
        }
Ejemplo n.º 5
0
        static RedisNodeController()
        {
            ListFields.RemoveField("WebHook", "AlarmMemoryRate", "AlarmConnections", "AlarmSpeed", "AlarmInputKbps", "AlarmOutputKbps");
            ListFields.RemoveCreateField();
            ListFields.RemoveField("UpdateUser", "UpdateUserID", "UpdateIP", "Remark");

            {
                var df = ListFields.AddListField("Monitor", "UpdateTime");
                df.DisplayName = "监控";
                df.Header      = "监控";
                df.Url         = "RedisData?redisId={Id}";
            }
            {
                var df = ListFields.AddListField("Queue", "UpdateTime");
                df.DisplayName = "队列";
                df.Header      = "队列";
                df.Url         = "RedisMessageQueue?redisId={Id}";
            }
            {
                var df = ListFields.AddListField("Refresh", "UpdateTime");
                df.DisplayName = "刷新";
                df.Header      = "刷新";
                df.Url         = "RedisNode/Refresh?Id={Id}";
                df.DataAction  = "action";
            }
            {
                var df = ListFields.AddListField("Log", "UpdateTime");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = $"/Admin/Log?category={HttpUtility.UrlEncode("Redis节点")}&linkId={{Id}}";
            }
        }
Ejemplo n.º 6
0
        static RedisDataController()
        {
            MenuOrder = 40;

            ListFields.RemoveField("Id");
            ListFields.RemoveField("TopCommand");
        }
Ejemplo n.º 7
0
        /// <summary>
        ///     Check if a property is indexed
        /// </summary>
        /// <param name="propertyName"></param>
        /// <returns></returns>
        public bool IsIndexed(string propertyName)
        {
            if (propertyName == PrimaryKeyField.Name)
            {
                return(true);
            }

            if (IndexFields.Any(f => f.Name == propertyName))
            {
                return(true);
            }

            if (UniqueKeyFields.Any(f => f.Name == propertyName))
            {
                return(true);
            }

            if (ListFields.Any(f => f.Name == propertyName))
            {
                return(true);
            }


            return(false);
        }
Ejemplo n.º 8
0
 static LogController()
 {
     // 日志列表需要显示详细信息,不需要显示用户编号
     ListFields.AddField("Action", "Remark");
     ListFields.RemoveField("CreateUserID");
     FormFields.RemoveField("Remark");
 }
Ejemplo n.º 9
0
 private void button3_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < ListFields.Items.Count; i++)
     {
         ListFields.SetItemChecked(i, true);
     }
 }
Ejemplo n.º 10
0
        public StaffViewModel LoadViewModel()
        {
            StaffViewModel objVM     = new StaffViewModel();
            ListFields     objFields = null;

            objVM.ListFields = new List <ListFields>();

            SelectList classList      = null;
            SelectList courseList     = null;
            SelectList sectionList    = null;
            SelectList departmentList = null;
            SelectList subjectList    = null;
            SelectList staffTypeList  = null;

            this.LoadSelectLists(out classList, out courseList, out sectionList, out departmentList, out subjectList, out staffTypeList, false);

            for (int i = 0; i < 10; i++)
            {
                objFields                = new ListFields();
                objFields.CourseList     = courseList;
                objFields.DepartmentList = departmentList;
                objFields.ClassList      = classList;
                objFields.SectionList    = sectionList;
                objFields.SubjectList    = subjectList;
                objVM.ListFields.Add(objFields);
            }
            objVM.StaffTypeList = staffTypeList;
            return(objVM);
        }
Ejemplo n.º 11
0
        static MenuController()
        {
            MenuOrder = 80;

            // 过滤要显示的字段
            ListFields.RemoveField("Remark");
        }
Ejemplo n.º 12
0
        static NodeOnlineController()
        {
            ListFields.RemoveField("SessionID", "IP", "ProvinceID", "CityID", "Macs", "Token");

            //{
            //    var df = ListFields.AddDataField("Category");
            //    df.Header = "分类";
            //    df.DisplayName = "{Category}";
            //    df.Url = "?category={Category}";
            //}
            //{
            //    var df = ListFields.AddDataField("NodeName");
            //    df.Header = "设备";
            //    df.Url = "Node?id={NodeID}";
            //}
            //{
            //    var df = ListFields.AddDataField("NodeData", null, "NodeName");
            //    df.DisplayName = "数据";
            //    df.Url = "NodeData?nodeId={NodeID}";
            //}
            //{
            //    var df = ListFields.AddDataField("Temperature");
            //    df.DisplayName = "{Temperature}°C";
            //}
        }
        static RedisMessageQueueController()
        {
            MenuOrder = 30;

            ListFields.RemoveCreateField();
            ListFields.RemoveUpdateField();
            ListFields.AddField("UpdateTime");
        }
Ejemplo n.º 14
0
        public ListFields ListFields()
        {
            ListFields action = new ListFields();

            action.Client(client);
            action.Proxy(proxy);
            return(action);
        }
Ejemplo n.º 15
0
        static UserConnectController()
        {
            MenuOrder = 40;

            ListFields.RemoveField("AccessToken");
            ListFields.RemoveField("RefreshToken");
            ListFields.RemoveField("Avatar");
        }
Ejemplo n.º 16
0
 static NodeVersionController()
 {
     {
         var df = ListFields.AddListField("Log", "CreateUserID");
         df.DisplayName = "修改日志";
         df.Header      = "修改日志";
         df.Url         = "/Admin/Log?category=节点版本&linkId={ID}";
     }
 }
Ejemplo n.º 17
0
 static AppRuleController()
 {
     {
         var df = ListFields.AddDataField("Log", "CreateUserID");
         df.DisplayName = "修改日志";
         df.Header      = "修改日志";
         df.Url         = "/Admin/Log?category=应用规则&linkId={Id}";
     }
 }
Ejemplo n.º 18
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (txtBoxLayer.Text == "")
     {
         MessageBox.Show("请选择目标图层!");
         return;
     }
     if (txtBoxExcelPath.Text == "")
     {
         MessageBox.Show("请选择导入的外业调查表!");
         return;
     }
     if (cmbKeyField.Text == "")
     {
         MessageBox.Show("请选择匹配的关键字段!");
         return;
     }
     if (m_pCurFeaCls != null)
     {
         List <string> ListFieldNames = new List <string>();
         for (int i = 0; i < ListFields.Items.Count; i++)
         {
             if (ListFields.GetItemChecked(i))
             {
                 string strChineseName = ListFields.Items[i].ToString();
                 int    intFieldIndex  = -1;
                 if (_DicFieds.ContainsKey(strChineseName) && strChineseName != cmbKeyField.Text)
                 {
                     intFieldIndex = _DicFieds[strChineseName];
                     string strFieldName = m_pCurFeaCls.Fields.get_Field(intFieldIndex).Name;
                     ListFieldNames.Add(strFieldName);
                 }
             }
         }
         string strKeyChineseName = cmbKeyField.Text;
         string strKeyFieldName   = "";
         if (_DicFieds.ContainsKey(strKeyChineseName))
         {
             int indexKeyField = _DicFieds[strKeyChineseName];
             strKeyFieldName = m_pCurFeaCls.Fields.get_Field(indexKeyField).Name;
         }
         if (ListFieldNames.Count == 0)
         {
             MessageBox.Show("请选择导入的属性!");
             return;
         }
         if (strKeyFieldName == "")
         {
             MessageBox.Show("找不到匹配的关键字段!");
             return;
         }
         if (strKeyFieldName != "")
         {
             DoImport(m_pCurFeaCls, txtBoxExcelPath.Text, ListFieldNames, strKeyFieldName);
         }
     }
 }
Ejemplo n.º 19
0
 static AppTracerController()
 {
     {
         var df = ListFields.AddListField("Log", "CreateUser");
         df.DisplayName = "修改日志";
         df.Header      = "修改日志";
         df.Url         = "/Admin/Log?category=应用跟踪器&linkId={Id}";
     }
 }
Ejemplo n.º 20
0
        static ModelTableController()
        {
            MenuOrder = 55;

            ListFields.RemoveField("Controller", "TableName", "ConnName");

            {
                var df = ListFields.AddListField("Columns", "Enable");
                df.Header      = "列集合";
                df.DisplayName = "列集合";
                df.Url         = "ModelColumn?tableId={Id}";
            }

            ModelTableSetting = table =>
            {
                var columns = table.GetColumns();

                // 不在列表页显示
                var fields = columns.FindAll(fa =>
                                             fa.ShowInList &&
                                             (fa.Name.EqualIgnoreCase(ModelTable._.Controller) ||
                                              fa.Name.EqualIgnoreCase(ModelTable._.TableName) ||
                                              fa.Name.EqualIgnoreCase(ModelTable._.ConnName)));

                foreach (var field in fields)
                {
                    field.ShowInList = false;
                }

                // 调整列宽
                columns.Find(f => f.Name.EqualIgnoreCase(ModelTable._.Name)).Width        = "115";
                columns.Find(f => f.Name.EqualIgnoreCase(ModelTable._.DisplayName)).Width = "115";
                columns.Find(f => f.Name.EqualIgnoreCase(ModelTable._.Url)).Width         = "200";

                columns.Save();

                // 添加列
                var column = ModelColumn.FindByTableIdAndName(table.Id, "Columns") ?? new ModelColumn
                {
                    TableId     = table.Id,
                    Name        = "Columns",
                    DisplayName = "列集合",
                    //CellText = "列集合",
                    //CellTitle = "列集合",
                    CellUrl    = "/Admin/ModelColumn?tableId={id}",
                    ShowInList = true,
                    Enable     = true,
                    Sort       = 5,
                    Width      = "80",
                };

                column.Save();

                return(table);
            };
        }
Ejemplo n.º 21
0
 static UserController()
 {
     ListFields.RemoveField("Phone");
     ListFields.RemoveField("Code");
     ListFields.RemoveField("StartTime");
     ListFields.RemoveField("EndTime");
     ListFields.RemoveField("RegisterTime");
     ListFields.RemoveField("Question");
     ListFields.RemoveField("Answer");
 }
Ejemplo n.º 22
0
 static EntityControllerBase()
 {
     // 过滤掉一些字段
     ListFields.Replace("CreateUserID", "CreateUserName")
     .Replace("UpdateUserID", "UpdateUserName");
     FormFields.Replace("CreateUserID", "CreateUserName")
     .Replace("UpdateUserID", "UpdateUserName")
     .RemoveField("CreateTime")
     .RemoveField("UpdateTime");
 }
Ejemplo n.º 23
0
        static ParameterController()
        {
            MenuOrder = 65;

            ListFields.RemoveField("Ex1");
            ListFields.RemoveField("Ex2");
            ListFields.RemoveField("Ex3");
            ListFields.RemoveField("Ex4");
            ListFields.RemoveField("Ex5");
            ListFields.RemoveField("Ex6");
        }
Ejemplo n.º 24
0
        static AppOnlineController()
        {
            ListFields.RemoveField("Token");

            {
                var df = ListFields.AddListField("Meter", null, "PingCount");
                df.DisplayName = "性能";
                df.Header      = "性能";
                df.Url         = "AppMeter?appId={AppId}";
            }
        }
Ejemplo n.º 25
0
        public ActionResult Edit(long id)
        {
            StaffViewModel         objStaff = this.repository.GetStaff(id);
            List <TeacherSubjects> objTeacherSubjectsList = this.repository.GetTeacherSubjects(objStaff.UserId);
            ListFields             objFields = null;

            objStaff.Count      = objTeacherSubjectsList.Count;
            objStaff.ListFields = new List <ListFields>();

            SelectList classList      = null;
            SelectList courseList     = null;
            SelectList sectionList    = null;
            SelectList departmentList = null;
            SelectList subjectList    = null;
            SelectList staffTypeList  = null;


            for (int i = 0; i < objTeacherSubjectsList.Count; i++)
            {
                this.LoadSelectLists(out classList, out courseList, out sectionList, out departmentList, out subjectList, out staffTypeList, true, objStaff.OrganizationId, objTeacherSubjectsList[i].CourseId, objTeacherSubjectsList[i].DepartmentId, objTeacherSubjectsList[i].ClassId, (int)objTeacherSubjectsList[i].SectionId, objTeacherSubjectsList[i].SubjectId, objStaff.StaffTypeId);
                objFields                = new ListFields();
                objFields.CourseList     = courseList;
                objFields.DepartmentList = departmentList;
                objFields.ClassList      = classList;
                objFields.SectionList    = sectionList;
                objFields.SubjectList    = subjectList;
                objFields.Id             = objTeacherSubjectsList[i].Id;
                objStaff.ListFields.Add(objFields);
                if (i + 1 == objTeacherSubjectsList.Count)
                {
                    if (objTeacherSubjectsList.Count < 10)
                    {
                        for (int j = objTeacherSubjectsList.Count; j < 10; j++)
                        {
                            this.LoadSelectLists(out classList, out courseList, out sectionList, out departmentList, out subjectList, out staffTypeList, false);
                            objFields                = new ListFields();
                            objFields.CourseList     = courseList;
                            objFields.DepartmentList = departmentList;
                            objFields.ClassList      = classList;
                            objFields.SectionList    = sectionList;
                            objFields.SubjectList    = subjectList;
                            objStaff.ListFields.Add(objFields);
                        }
                    }
                }
            }
            objStaff.StaffTypeList   = staffTypeList;
            objStaff.StaffPermission = this.repository.GetStaffPermissions(objStaff.UserId);
            if (objStaff.StaffPermission == null)
            {
                objStaff.StaffPermission = new StaffPermission();
            }
            return(View(objStaff));
        }
Ejemplo n.º 26
0
        static ConfigDataController()
        {
            ListFields.AddField("Scope", "Value");

            AddFormFields.RemoveCreateField();
            AddFormFields.RemoveField("Version");

            EditFormFields.RemoveCreateField();
            EditFormFields.RemoveUpdateField();
            EditFormFields.RemoveField("Version");
        }
Ejemplo n.º 27
0
        static SampleData2Controller()
        {
            ListFields.RemoveField("ID");
            ListFields.RemoveField("DataId");

            var df = ListFields.AddListField("trace", "TraceId");

            df.DisplayName = "追踪";
            df.Header      = "追踪";
            df.Url         = "/trace?id={TraceId}";
        }
Ejemplo n.º 28
0
        static AppController()
        {
            MenuOrder = 58;

            {
                var df = ListFields.AddDataField("Configs", "Enable");
                df.Header      = "配置";
                df.DisplayName = "配置";
                df.Url         = "ConfigData?appId={ID}";
            }
        }
Ejemplo n.º 29
0
        static DepartmentController()
        {
            MenuOrder = 95;

            ListFields.RemoveField("Ex1");
            ListFields.RemoveField("Ex2");
            ListFields.RemoveField("Ex3");
            ListFields.RemoveField("Ex4");
            ListFields.RemoveField("Ex5");
            ListFields.RemoveField("Ex6");
        }
Ejemplo n.º 30
0
        static UserController()
        {
            MenuOrder = 100;

            ListFields.RemoveField("Avatar", "RoleIds", "Online", "RegisterIP", "RegisterTime");
            ListFields.RemoveField("Phone", "Code", "Question", "Answer");
            ListFields.RemoveField("Ex1", "Ex2", "Ex3", "Ex4", "Ex5", "Ex6");
            ListFields.RemoveUpdateField();
            ListFields.RemoveField("Remark");

            {
                var df = ListFields.AddListField("Link", "Logins");
                df.Header      = "链接";
                df.HeaderTitle = "第三方登录的链接信息";
                df.DisplayName = "链接";
                df.Title       = "第三方登录的链接信息";
                df.Url         = "UserConnect?userId={ID}";
            }

            {
                var df = ListFields.AddListField("Token", "Logins");
                df.Header      = "令牌";
                df.DisplayName = "令牌";
                df.Url         = "UserToken?userId={ID}";
            }

            {
                var df = ListFields.AddListField("Log", "Logins");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "Log?userId={ID}";
            }

            {
                var df = ListFields.AddListField("OAuthLog", "Logins");
                df.Header      = "OAuth日志";
                df.DisplayName = "OAuth日志";
                df.Url         = "OAuthLog?userId={ID}";
            }

            {
                var df = AddFormFields.AddDataField("RoleIds", "RoleNames");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
                AddFormFields.RemoveField("RoleNames");
            }

            {
                var df = EditFormFields.AddDataField("RoleIds", "RoleNames");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
                EditFormFields.RemoveField("RoleNames");
            }
        }