示例#1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminRole> GetList()
        {
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminRole", -1, -1, "", "OrderID asc"); //dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
示例#2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.ActivityImg> GetList(int pageSize, int pageIndex, string strWhere, string strOrder)
        {
            var db = new DAL.Common();
            var ds = db.GetList("ActivityImg", pageSize, pageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
示例#3
0
文件: UserInfo.cs 项目: ttrr1/Midea
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  Method

        /// <summary>
        /// 返回一个数据表  List的前身
        /// </summary>
        public DataTable GetTable(int pageSize, int pageIndex, string strWhere, string strOrder)
        {
            var db = new DAL.Common();
            var ds = db.GetList("UserInfo", pageSize, pageIndex, strWhere, strOrder);

            return(ds.Tables[0]);
        }
示例#4
0
文件: AdminFlag.cs 项目: ttrr1/Midea
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminFlag> GetList(int ParentID, int FlagType, int IsNav, string FlagAction)
        {
            string strWhere = "ParentID = " + ParentID;

            if (FlagType != -1)
            {
                strWhere += " and FlagType=" + FlagType.ToString();
            }

            if (IsNav == 0 || IsNav == 1)
            {
                strWhere += " and IsNav=" + IsNav;
            }

            FlagAction = FlagAction.ToLower();
            if (FlagAction != "")
            {
                strWhere += " and FlagAction='" + Utils.SqlStringFormat(FlagAction, 1) + "'";
            }

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminFlag", -1, -1, strWhere, "OrderID asc"); // dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
示例#5
0
文件: AdminFlag.cs 项目: ttrr1/Midea
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminFlag> GetList(string strWhere)
        {
            var db = new DAL.Common();
            var ds = db.GetList("AdminFlag", -1, -1, strWhere, "OrderID asc"); // dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
示例#6
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.EquipmentModel> GetList(int pageSize, int pageIndex, string strWhere, string strOrder)
        {
            var db = new DAL.Common();
            var ds = db.GetList("EquipmentModel", pageSize, pageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
示例#7
0
文件: Orders.cs 项目: ttrr1/Midea
        /// <summary>
        /// 订单列表查询
        /// </summary>
        public DataTable GetListForMoreTable(int pageSize, int pageIndex, string strWhere, string order)
        {
            var db = new DAL.Common();
            //var ds = db.GetListForMoreTable("UserInfo u,Orders o", pageSize, pageIndex, condition, order, "u.RealName AS workerName ,o.*");
            var ds = db.GetList("Orders", pageSize, pageIndex, strWhere, order, "UserInfo", "RealName AS workerName", "WorkerId = UserInfo.UserName");

            return(ds.Tables[0]);
        }
示例#8
0
        /// <summary>
        /// 获得数据列表(分页获取)
        /// </summary>
        public List <Sys.Model.Member> GetList(int PageSize, int PageIndex, string strWhere)
        {
            string strOrder = "CreateTime desc";

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("Member", PageSize, PageIndex, strWhere, "UserID asc");

            return(DataTableToList(ds.Tables[0]));
        }
示例#9
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public List <Sys.Model.Admin> GetList(string strWhere)
        {
            const string strOrder  = " UserName";
            const int    pageSize  = -1;
            const int    pageIndex = -1;
            var          db        = new DAL.Common();
            var          ds        = db.GetList("Admin", pageSize, pageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
示例#10
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="Flag"></param>
        /// <param name="UserID"></param>
        /// <param name="StartTime"></param>
        /// <param name="EndTime"></param>
        /// <returns></returns>
        public List <Sys.Model.AdminLog> GetList(int PageSize, int PageIndex, string Flag, int FlagLike, int UserID, string StartTime, string EndTime)
        {
            string strWhere = "";

            if (Flag != "")
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                if (FlagLike == 1)
                {
                    strWhere += "Flag like '%" + Utils.SqlStringFormat(Flag, 2) + "%'";
                }
                else
                {
                    strWhere += "Flag ='" + Utils.SqlStringFormat(Flag, 1) + "'";
                }
            }

            if (UserID > 0)
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "UserID =" + UserID + "";
            }

            if (StartTime != "" & Utils.IsDateTime(StartTime))
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "CreateTime >='" + Utils.SqlStringFormat(StartTime, 1) + "'";
            }

            if (EndTime != "" & Utils.IsDateTime(EndTime))
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "CreateTime <='" + Utils.SqlStringFormat(EndTime, 1) + "'";
            }

            string strOrder = "ID desc";

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminLog", PageSize, PageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
示例#11
0
文件: Account.cs 项目: ttrr1/Midea
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.Account> GetList(string strCondition)
        {
            var strWhere  = "";
            var strOrder  = "";
            var PageSize  = -1;
            var PageIndex = -1;
            var db        = new DAL.Common();
            var ds        = db.GetList("Account", PageSize, PageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
示例#12
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="BlockModule">限制模块 0系统 1用户</param>
        /// <param name="BlockType">限制方式 0白名单 1黑名单</param>
        /// <returns></returns>
        public List <Sys.Model.SysIpBlock> GetList(int BlockModule, int BlockType)
        {
            string strWhere  = "BlockModule=" + BlockModule + " and BlockType=" + BlockType;
            string strOrder  = "ID desc";
            int    PageSize  = -1;
            int    PageIndex = -1;

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("SysIpBlock", PageSize, PageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
示例#13
0
文件: AdminFlag.cs 项目: ttrr1/Midea
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminFlag> GetList(int parentID, int flagType)
        {
            string strWhere = "ParentID = " + parentID;

            if (flagType != -1)
            {
                strWhere += "AND FlagType=" + flagType;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminFlag", -1, -1, strWhere, "OrderID asc"); // dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
示例#14
0
文件: SysConfig.cs 项目: ttrr1/Midea
        /// <summary>
        /// 数据列表
        /// </summary>
        /// <param name="Item">项目类别</param>
        /// <param name="IsUsing">是否启用 0不启用 1启用 -1全部</param>
        /// <returns></returns>
        public List <Sys.Model.SysConfig> GetList(string Item, int IsUsing)
        {
            string strWhere = "Item='" + Utils.SqlStringFormat(Item, 1) + "'";

            if (IsUsing == 0 || IsUsing == 1)
            {
                strWhere += " and IsUsing=" + IsUsing;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("SysConfig", 0, 0, strWhere, "OrderID asc"); //GetList(Item, IsUsing);

            return(DataTableToList(ds.Tables[0]));
        }
示例#15
0
文件: SysConfig.cs 项目: ttrr1/Midea
        /// <summary>
        /// 数据列表
        /// </summary>
        /// <param name="Item">项目类别</param>
        /// <param name="IsUsing">是否启用 0不启用 1启用 -1全部</param>
        /// <returns></returns>
        public DataSet GetDataSet(string Item, int IsUsing)
        {
            string strWhere = "Item='" + Utils.SqlStringFormat(Item, 1) + "'";

            if (IsUsing == 0 || IsUsing == 1)
            {
                strWhere += " and IsUsing=" + IsUsing;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("SysConfig", 0, 0, strWhere, "OrderID asc"); //GetList(Item, IsUsing);

            return(ds);
        }
示例#16
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="isAdmin">1表示是Amdin,-1表是不是Admin</param>
        /// <returns></returns>
        public List <Sys.Model.Member> GetList(int isAdmin)
        {
            string strWhere = "";

            if (isAdmin == 1)
            {
                strWhere += " UserID in (SELECT UserID FROM Admin) ";
            }
            else if (isAdmin == -1)
            {
                strWhere += " UserID not in (SELECT UserID FROM Admin) ";
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("Member", -1, -1, strWhere, "UserID asc");

            return(DataTableToList(ds.Tables[0]));
        }
示例#17
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminRole> GetList(string RoleIDs)
        {
            DAL.Common db       = new DAL.Common();
            string     strWhere = "";

            if (RoleIDs == "")
            {
                strWhere = " 1=2";
            }
            else
            {
                strWhere = "RoleID in (" + RoleIDs + ")";
            }

            DataSet ds = db.GetList("AdminRole", -1, -1, strWhere, "OrderID asc");   //dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
示例#18
0
 /// <summary>
 /// 分页获取数据列表(使用原则:程序内设定数据,非客户端提交数据。使用前提,保证SQL字符串安全,Utils.SqlStringFormat)
 /// </summary>
 /// <param name="tblName">表的名字</param>
 /// <param name="PageSize">每页数据条数,-1:全部</param>
 /// <param name="PageIndex">第几页,-1:全部</param>
 /// <param name="strWhere">搜索条件</param>
 /// <param name="strOrder">排序</param>
 /// <returns></returns>
 public DataSet GetList(string tblName, int PageSize, int PageIndex, string strWhere, string strOrder)
 {
     return(dal.GetList(tblName, PageSize, PageIndex, strWhere, strOrder));
 }