Beispiel #1
0
 /// <summary>
 /// 得到不同条件得到列表
 /// </summary>
 /// <param name="strWhere"></param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetList(string strWhere)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_mailreceiver [where] " + strWhere + " [order by] id desc";
     dataPage.GetRecordSetByPage();
     return(dataPage);
 }
Beispiel #2
0
 /// <summary>
 /// 所有记录
 /// </summary>
 /// <remarks></remarks>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_role [where] 1=1 [order by] id asc";
     dataPage.GetRecordSetByPage();
     return(dataPage);
 }
Beispiel #3
0
 public ChangeHope.DataBase.DataByPage GetListDB(string where)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.PageSize = 100;
     dataPage.Sql      = "[select] *,(select top 1 loginintime from yxs_adminloginlog where adminname=yxs_administrators.name order by id desc)as logintime,(select top 1 loginip from yxs_adminloginlog where adminname=yxs_administrators.name order by id desc)as loginip [from] yxs_administrators [where] 1=1 " + where + " [order by] state,adminid asc";
     dataPage.GetRecordSetByPage();
     return(dataPage);
 }
Beispiel #4
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            ChangeHope.WebPage.Table table = new ChangeHope.WebPage.Table();
            // 得到所有记录
            string strWhere = "1=1";

            if (q.Text.Trim() != string.Empty)
            {
                strWhere += " and isnull(Keyword,'') + isnull(EventDescription,'') like '%" + q.Text.Trim().Replace("'", "") + "%' ";
            }
            if (t.Text.Trim() != string.Empty)
            {
                strWhere += " and convert(char(10),OperateTime,120)='" + t.Text.Trim().Replace("'", "") + "' ";
            }
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
            dataPage.Sql = "[select] * [from] yxs_SysLog  [where] " + strWhere + " [order by] id desc";
            dataPage.GetRecordSetByPage();
            //第一步先添加表头
            table.AddHeadCol("5", "<input type=\"checkbox\" id=\"chkAll\" onclick=\"CheckAll(this.form)\" alt=\"全选/取消\" title=\"全选/取消\" />");
            table.AddHeadCol("70", "关键词");
            table.AddHeadCol("120", "系统模块");
            table.AddHeadCol("", "事件描述");
            table.AddHeadCol("45", "用户ID");
            table.AddHeadCol("", "来源");
            table.AddHeadCol("115", "时间");
            //table.AddHeadCol("", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                while (dataPage.DataReader.Read())
                {
                    table.AddCol("<input ID=\"cBox\" type=\"checkbox\" name=\"chk\" value=\"" + dataPage.DataReader["ID"].ToString() + "\" />");
                    table.AddCol(dataPage.DataReader["Keyword"].ToString());
                    table.AddCol(dataPage.DataReader["SubModule"].ToString());
                    table.AddCol(dataPage.DataReader["EventDescription"].ToString());
                    string UID     = dataPage.DataReader["UID"].ToString();
                    string AdminID = dataPage.DataReader["AdminID"].ToString();
                    table.AddCol(string.IsNullOrEmpty(UID) ? (string.IsNullOrEmpty(AdminID) ? "" : "" + new SOSOshop.BLL.Db().ExecuteScalar("select name from yxs_administrators where adminid=" + AdminID)) : "" + new SOSOshop.BLL.Db().ExecuteScalar("select isnull(TrueName,IncName) from yxs_memberinfo where UID=" + UID));
                    table.AddCol(dataPage.DataReader["Source"].ToString());
                    table.AddCol(dataPage.DataReader["OperateTime"].ToString());
                    //table.AddCol("");
                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;

            dataPage.Dispose();
            dataPage = null;
            return(view);
        }
Beispiel #5
0
 /// <summary>
 /// 根据用户ID及类型查
 /// </summary>
 /// <param name="userId"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetListByIdAndType(int userId, int type)
 {
     StringBuilder strSql = new StringBuilder();
     strSql.Append("[select] * [from] yxs_userinfonote [where] userId=");
     strSql.Append(userId + " and noteType="+type);
     strSql.Append(" [order by] id asc ");
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = strSql.ToString();
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
        public ChangeHope.DataBase.DataByPage GetListDataByPage(string where)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("[select] * [from] DrugsBase_Enterprise [where] 1=1 ");
            if (where != null && where != "")
            {
                strSql.Append(where);
            }
            strSql.Append(" [order by] ID desc");
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
            dataPage.Sql = strSql.ToString();
            dataPage.GetRecordSetByPage();
            return(dataPage);
        }
 public ChangeHope.DataBase.DataByPage GetListByWhere(string id, int topNumber, int pagesize)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     if (!string.IsNullOrWhiteSpace(id))
         dataPage.Sql = "[select] * [from] PropertyValue [where] PropertyID = " + id + " [order by] PropertyValueID desc;";
     if (topNumber > 0)
     {
         dataPage.PageSize = topNumber;
     }
     else
     {
         dataPage.PageSize = pagesize;
     }
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #8
0
        public ChangeHope.DataBase.DataByPage GetListDataByPage(string where)
        {
            StringBuilder strSql = new StringBuilder();
            string        a      = "a.UserType, a.UserGroup, a.UserId, a.MobilePhone, a.Email, a.Email_QQ, a.PassWord, a.Question, a.Answer, a.State, a.IsLookPrice, a.RegisterDate, a.RegisterIP, a.Capital, a.Coupons, a.Points, a.PeriodOfValidity, ";
            string        b      = "b.* ";

            strSql.Append("[select] " + a + b + ",ISNULL(e.Name,'') AS Enterprise [from] memberaccount AS a INNER JOIN memberinfo AS b ON a.UID=b.UID LEFT JOIN DrugsBase_Enterprise AS e ON b.ParentId=e.ID [where] 1=1 ");
            if (!string.IsNullOrEmpty(where))
            {
                strSql.Append(where);
            }
            strSql.Append(" [order by] a.UID desc");
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
            dataPage.Sql = strSql.ToString();
            dataPage.GetRecordSetByPage();
            return(dataPage);
        }
        public ChangeHope.DataBase.DataByPage GetList(string where)
        {
            string        a      = "a.UserType, a.UserGroup, a.UserId, a.MobilePhone, a.Email, a.Email_QQ, a.PassWord, a.Question, a.Answer, a.State, a.RegisterDate, a.RegisterIP, a.Capital, a.Coupons, a.Points, a.PeriodOfValidity, a.CompanyClass ";
            string        b      = "b.*,c.*";
            StringBuilder strSql = new StringBuilder();

            strSql.Append("[select] " + a + b);
            strSql.Append(" [from] memberaccount a inner join memberinfo b on a.UID=b.UID inner join memberpermission c on a.UID=c.UID [where] 1=1 ");
            if (!string.IsNullOrEmpty(where))
            {
                strSql.Append(where);
            }
            strSql.Append(" [order by] a.UID desc");
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
            dataPage.Sql = strSql.ToString();
            dataPage.GetRecordSetByPage();
            return(dataPage);
        }
        public ChangeHope.DataBase.DataByPage GetListByWhere(string name,int topNumber, int pagesize)
        {
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
            if (!string.IsNullOrWhiteSpace(name))
                dataPage.Sql = "[select] * [from] Property [where] PropertyName like '%" + name + "%' [order by] PropertyID desc;";
            else
                dataPage.Sql = "[select] * [from] Property [where] 1=1 [order by] PropertyID desc;";

            if (topNumber > 0)
            {
                dataPage.PageSize = topNumber;
            }
            else
            {
                dataPage.PageSize = pagesize;
            }
            dataPage.GetRecordSetByPage();
            return dataPage;
        }
Beispiel #11
0
 public ChangeHope.DataBase.DataByPage GetListByWhereAndOrder(string where, int pagesize, string orderfield)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_article [where]  "+where+" [order by] "+orderfield+" ";
     dataPage.PageSize = pagesize;
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #12
0
 /// <summary>
 /// 跟据配送方式条件查询对应的配送区域列表
 /// </summary>
 /// <param name="cid">配送方式ID</param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetAreasBy(string Condits)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] " + Pre + "deliveryareasetting [where] 1=1 "+Condits+" [order by] Id asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #13
0
 public ChangeHope.DataBase.DataByPage GetList(string where)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] *,(select name from yxs_articlechannel where id=yxs_Article.Channel)as ChannelContent [from] yxs_Article [where] 1=1 " + where + " [order by] id desc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #14
0
 /// <summary>
 /// 跟据导航位置AreaName查询属性
 /// </summary>
 /// <param name="cid"></param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetProperty(string DistributionName)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] " + Pre + "deliverymode Where ','+[DistributionName]+',' like '%," + DistributionName + ",%'";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #15
0
 /// <summary>
 /// 分页
 /// </summary>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetAllList()
 {
     string sql = "[select] * [from] yxs_paymentmanage [where] 1=1 [order by] payment_taxis asc";
     ChangeHope.DataBase.DataByPage datapage = new ChangeHope.DataBase.DataByPage();
     datapage.Sql = sql;
     datapage.GetRecordSetByPage();
     return datapage;
 }
Beispiel #16
0
 public ChangeHope.DataBase.DataByPage GetListDB()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] *,(select top 1 LogininTime from Adminloginlog where AdminName=Administrators.Name order by ID desc)as LoginTime,(select top 1 LoginIP from Adminloginlog where AdminName=Administrators.Name order by ID desc)as LoginIP [from] Administrators [where] 1=1 [order by] AdminID asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #17
0
 /// <summary>
 /// 分页列表
 /// </summary>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] " + Pre + "deliverymode [where] 1=1 [order by] Id asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #18
0
 public ChangeHope.DataBase.DataByPage GetList(string where)
 {
     StringBuilder strSql = new StringBuilder();
     strSql.Append("[select] *");
     strSql.Append(",(select content from yxs_code_usertype where code=yxs_MemberAccount.UserType) as UserTypeContent");
     strSql.Append(" ,(select Name from yxs_memberrank where id=yxs_MemberAccount.UserGroup) as UserGroupContent");
     strSql.Append(" [from] yxs_MemberAccount [where] 1=1 ");
     if (where!=null&&where!="")
     {
         strSql.Append(where);
     }
     strSql.Append(" [order by] UserId asc ");
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = strSql.ToString();
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #19
0
 /// <summary>
 /// 跟据配送方式ID查询对应的配送区域列表
 /// </summary>
 /// <param name="cid">配送方式ID</param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetAreasByPostMethod(int cid)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] " + Pre + "deliveryareasetting [where] DeliveryMode=" + cid.ToString() + " [order by] Id asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #20
0
 /// <summary>
 /// 根据不同条件查
 /// </summary>
 /// 
 public ChangeHope.DataBase.DataByPage GetListByWhere(string where)
 {
     StringBuilder strSql = new StringBuilder();
     strSql.Append("[select] * [from] yxs_userinfonote ");
     if (where != null & where != "")
     {
         strSql.Append(" [where] " + where + " ");
     }
     else
     {
         strSql.Append(" [where] 1=1 ");
     }
     strSql.Append(" [order by] id asc ");
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = strSql.ToString();
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #21
0
 /// <summary>
 /// 得到所有记录
 /// </summary>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_hailhellowlink [where] 1=1 [order by] sitelevel desc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #22
0
 /// <summary>
 /// 跟据AreaName查询属性
 /// </summary>
 /// <param name="cid"></param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetProperty(string AreaName)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = this.SelectSequel + "Where ','+[AreaName]+',' like '%," + AreaName + ",%'";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #23
0
 /// <summary>
 /// 所有记录
 /// </summary>
 /// <remarks></remarks>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_role [where] 1=1 [order by] id asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #24
0
 public ChangeHope.DataBase.DataByPage GetList()
 {
     string sql = "[select] *"
     + ",(select content from yxs_code_usertype where code=yxs_MemberAccount.UserType) as UserTypeContent"
     + " ,(select Name from yxs_memberrank where id=yxs_MemberAccount.UserGroup) as UserGroupContent"
     + " [from] yxs_MemberAccount [where] 1=1 [order by] UID desc";
     ChangeHope.DataBase.DataByPage datapage = new ChangeHope.DataBase.DataByPage();
     datapage.Sql = sql;
     datapage.GetRecordSetByPage();
     return datapage;
 }
Beispiel #25
0
 /// <summary>
 /// 排序所有记录
 /// </summary>
 /// <remarks></remarks>
 public ChangeHope.DataBase.DataByPage GetList(string orderfield, int pagesize, string Conditions)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_articlechannel [where] 1=1 " + Conditions + " " + orderfield;
     dataPage.PageSize = pagesize;
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #26
0
 /// <summary>
 /// 所有记录
 /// </summary>
 /// <remarks></remarks>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "select * from Product where 1=1 order by ProductID desc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #27
0
 /// <summary>
 /// 得到不同条件得到列表
 /// </summary>
 /// <param name="strWhere"></param>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetList(string strWhere)
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_ordertransfer [where] " + strWhere + " [order by] id asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #28
0
        /// <summary>
        /// 根据条件返回集合
        /// </summary>
        /// <param name="where"></param>
        /// <param name="topNumber">为0时查所有</param>
        /// <returns></returns>
        public ChangeHope.DataBase.DataByPage GetListByWhere(string where, int topNumber, int pagesize, string orderfield)
        {
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();

            dataPage.Sql = "select * from Product where  " + where + " order by " + orderfield + " ";

            if (topNumber > 0)
            {
                dataPage.PageSize = topNumber;
            }
            else
            {
                dataPage.PageSize = pagesize;
            }
            dataPage.GetRecordSetByPage();
            return dataPage;
        }
Beispiel #29
0
 /// <summary>
 /// 查询所有数据
 /// </summary>
 /// <remarks></remarks>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] " + Pre + "navigation [where] 1=1 [order by] sort asc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }
Beispiel #30
0
 /// <summary>
 /// 得到所有记录
 /// </summary>
 /// <returns></returns>
 public ChangeHope.DataBase.DataByPage GetList()
 {
     ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
     dataPage.Sql = "[select] * [from] yxs_advertisemanage [where] 1=1 [order by] power desc";
     dataPage.GetRecordSetByPage();
     return dataPage;
 }