Exemplo n.º 1
0
        public List <SysMenuModel> GetMenuList(SysMenuModel model)
        {
            List <SysMenuModel> List = new List <SysMenuModel>();

            string[]        strPara     = new string[] { "@MenuID", "@ParentID", "@MenuName", "@MenuType", "@DeleteFlag", "@OUTTotalCount" };
            ParameterMapper mapper      = new ParameterMapper(strPara);
            var             ObjectModel = db.CreateSprocAccessor <SysMenuModel>("PROC_T_SYS_GetMenuList", mapper, MapBuilder <SysMenuModel> .MapNoProperties()
                                                                                .Map(p => p.MenuID).ToColumn("MenuID")
                                                                                .Map(p => p.ParentID).ToColumn("ParentID")
                                                                                .Map(p => p.MenuName).ToColumn("MenuName")
                                                                                .Map(p => p.MenuImg).ToColumn("MenuImg")
                                                                                .Map(p => p.MenuType).ToColumn("MenuType")
                                                                                .Map(p => p.NavigateUrl).ToColumn("NavigateUrl")
                                                                                .Map(p => p.SortCode).ToColumn("SortCode")
                                                                                .Map(p => p.DeleteFlag).ToColumn("DeleteFlag")
                                                                                .Map(p => p.CreateDate).ToColumn("CreateDate")
                                                                                .Map(p => p.RowNo).ToColumn("RowNo")
                                                                                .Build()
                                                                                );

            object[] param = { model.MenuID, model.ParentID, model.MenuName, model.MenuType, model.DeleteFlag, model.OUTTotalCount };
            List = ObjectModel.Execute(param).ToList <SysMenuModel>();
            model.OUTTotalCount = int.Parse(mapper.GetParameterValue("@OUTTotalCount").ToString());
            return(List);
        }
Exemplo n.º 2
0
        public List <SysButtonModel> GetButtonList(SysButtonModel model)
        {
            List <SysButtonModel> List = new List <SysButtonModel>();

            string[]        strPara     = new string[] { "@ButtonID", "@ButtonName", "@DeleteFlag", "@OUTTotalCount", "@PageIndex", "@PageSize" };
            ParameterMapper mapper      = new ParameterMapper(strPara);
            var             ObjectModel = db.CreateSprocAccessor <SysButtonModel>("PROC_T_SYS_GetButtonList", mapper, MapBuilder <SysButtonModel> .MapNoProperties()
                                                                                  .Map(p => p.ButtonID).ToColumn("ButtonID")
                                                                                  .Map(p => p.ButtonName).ToColumn("ButtonName")
                                                                                  .Map(p => p.ButtonImg).ToColumn("ButtonImg")
                                                                                  .Map(p => p.ButtonCode).ToColumn("ButtonCode")
                                                                                  .Map(p => p.ButtonType).ToColumn("ButtonType")
                                                                                  .Map(p => p.SortCode).ToColumn("SortCode")
                                                                                  .Map(p => p.DeleteFlag).ToColumn("DeleteFlag")
                                                                                  .Map(p => p.CreateDate).ToColumn("CreateDate")
                                                                                  .Map(p => p.ButtonRemark).ToColumn("ButtonRemark")
                                                                                  .Map(p => p.RowNo).ToColumn("RowNo")
                                                                                  .Build()
                                                                                  );

            object[] param = { model.ButtonID, model.ButtonName, model.DeleteFlag, model.OUTTotalCount, model.PageIndex, model.PageSize };
            List = ObjectModel.Execute(param).ToList <SysButtonModel>();
            model.OUTTotalCount = int.Parse(mapper.GetParameterValue("@OUTTotalCount").ToString());
            return(List);
        }
Exemplo n.º 3
0
        public List <SysRoleModel> GetRoleList(SysRoleModel model)
        {
            List <SysRoleModel> List = new List <SysRoleModel>();

            string[]        strPar      = new string[] { "@RoleID", "@RoleName", "@DeleteFlag", "@OUTTotalCount" };
            ParameterMapper mapper      = new ParameterMapper(strPar);
            var             ObjectModel = db.CreateSprocAccessor <SysRoleModel>("PROC_T_SYS_GetRoleList", mapper, MapBuilder <SysRoleModel> .MapNoProperties()
                                                                                .Map(p => p.RoleID).ToColumn("RoleID")
                                                                                .Map(p => p.RoleName).ToColumn("RoleName")
                                                                                .Map(p => p.RoleRemark).ToColumn("RoleRemark")
                                                                                .Map(p => p.AllowEdit).ToColumn("AllowEdit")
                                                                                .Map(p => p.AllowDelete).ToColumn("AllowDelete")
                                                                                .Map(p => p.SortCode).ToColumn("SortCode")
                                                                                .Map(p => p.DeleteFlag).ToColumn("DeleteFlag")
                                                                                .Map(p => p.CreateDate).ToColumn("CreateDate")
                                                                                .Map(p => p.CreatorID).ToColumn("CreatorID")
                                                                                .Map(p => p.ModifyDate).ToColumn("ModifyDate")
                                                                                .Map(p => p.ModifierID).ToColumn("ModifierID")
                                                                                .Build()
                                                                                );

            object[] param = { model.RoleID, model.RoleName, model.DeleteFlag, model.OUTTotalCount };
            List = ObjectModel.Execute(param).ToList <SysRoleModel>();
            model.OUTTotalCount = int.Parse(mapper.GetParameterValue("@OUTTotalCount").ToString());
            return(List);
        }
Exemplo n.º 4
0
        public List <SysUserModel> Login(SysUserModel model)
        {
            List <SysUserModel> list = new List <SysUserModel>();

            string[]        strPar      = new string[] { "@UserName", "@Password", "@OUTTotalCount" };
            ParameterMapper mapper      = new ParameterMapper(strPar);
            var             ObjectModel = db.CreateSprocAccessor <SysUserModel>("PROC_T_SYS_UserLogin", mapper, MapBuilder <SysUserModel> .MapNoProperties()
                                                                                .Map(p => p.UserID).ToColumn("UserID")
                                                                                .Map(p => p.UserName).ToColumn("UserName")
                                                                                .Map(p => p.Password).ToColumn("Password")
                                                                                .Build()
                                                                                );

            object[] param = { model.UserName, model.Password, model.OUTTotalCount };
            list = ObjectModel.Execute(param).ToList <SysUserModel>();
            model.OUTTotalCount = int.Parse(mapper.GetParameterValue("@OUTTotalCount").ToString());
            return(list);
        }
Exemplo n.º 5
0
        public List <SystemErrorLogModel> GetList(SystemErrorLogModel model)
        {
            List <SystemErrorLogModel> List = new List <SystemErrorLogModel>();

            string[]        strPara     = new string[] { "@PageIndex", "@PageSize", "@OUTTotalCount" };
            ParameterMapper mapper      = new ParameterMapper(strPara);
            var             ObjectModel = db.CreateSprocAccessor <SystemErrorLogModel>("PROC_T_SYS_GetSystemErrorLogList", mapper, MapBuilder <SystemErrorLogModel> .MapNoProperties()
                                                                                       .Map(p => p.ID).ToColumn("ID")
                                                                                       .Map(p => p.ErrorType).ToColumn("ErrorType")
                                                                                       .Map(p => p.ErrorMessage).ToColumn("ErrorMessage")
                                                                                       .Map(p => p.PathAndQuery).ToColumn("PathAndQuery")
                                                                                       .Map(p => p.ClientIP).ToColumn("ClientIP")
                                                                                       .Map(p => p.ErrorTime).ToColumn("ErrorTime")
                                                                                       .Map(p => p.StackTrace).ToColumn("StackTrace")
                                                                                       .Build()
                                                                                       );

            object[] param = { model.PageIndex, model.PageSize, model.OUTTotalCount };
            List = ObjectModel.Execute(param).ToList <SystemErrorLogModel>();
            model.OUTTotalCount = int.Parse(mapper.GetParameterValue("@OUTTotalCount").ToString());
            return(List);
        }
Exemplo n.º 6
0
        public List <ColumnModel> GetTableColumnList(string TableName)
        {
            List <ColumnModel> list = new List <ColumnModel>();

            string[]        strPar      = new string[] { "@TableName" };
            ParameterMapper mapper      = new ParameterMapper(strPar);
            var             ObjectModel = db.CreateSprocAccessor <ColumnModel>("PROC_T_SYS_GetTableColumnList", mapper, MapBuilder <ColumnModel> .MapNoProperties()
                                                                               .Map(p => p.RowNo).ToColumn("RowNo")
                                                                               .Map(p => p.ColumnName).ToColumn("ColumnName")
                                                                               .Map(p => p.DataType).ToColumn("DataType")
                                                                               .Map(p => p.Length).ToColumn("Length")
                                                                               .Map(p => p.IsNull).ToColumn("IsNull")
                                                                               .Map(p => p.IsMark).ToColumn("IsMark")
                                                                               .Map(p => p.IsKey).ToColumn("IsKey")
                                                                               .Map(p => p.Defaults).ToColumn("Defaults")
                                                                               .Map(p => p.Explanation).ToColumn("Explanation")
                                                                               .Build()
                                                                               );

            object[] param = { TableName };
            list = ObjectModel.Execute(param).ToList <ColumnModel>();
            return(list);
        }