예제 #1
0
        /// <summary>
        /// 组合搜索条件
        /// </summary>
        /// <param name="mssqlCondition"></param>
        /// <param name="emailSendRecordSearch">EmailSendRecordSearchInfo模型变量</param>
        public MssqlCondition PrepareCondition(EmailSendRecordSearchInfo emailSendRecordSearch)
        {
            MssqlCondition mssqlCondition = new MssqlCondition();

            mssqlCondition.Add("[IsSystem]", emailSendRecordSearch.IsSystem, ConditionType.Equal);

            return(mssqlCondition);
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadEmailSendRecord", PowerCheckType.Single);
         this.isSystem = RequestHelper.GetQueryString <int>("IsSystem");
         this.isSystem = (this.isSystem == -2147483648) ? 0 : this.isSystem;
         EmailSendRecordSearchInfo emailSendRecord = new EmailSendRecordSearchInfo();
         emailSendRecord.IsSystem = this.isSystem;
         base.BindControl(EmailSendRecordBLL.SearchEmailSendRecordList(base.CurrentPage, base.PageSize, emailSendRecord, ref this.Count), this.RecordList, this.MyPager);
     }
 }
예제 #3
0
        public List <EmailSendRecordInfo> SearchEmailSendRecordList(EmailSendRecordSearchInfo emailSendRecordSearch)
        {
            MssqlCondition mssqlCondition = new MssqlCondition();

            this.PrepareCondition(mssqlCondition, emailSendRecordSearch);
            List <EmailSendRecordInfo> emailSendRecordList = new List <EmailSendRecordInfo>();

            SqlParameter[] pt = new SqlParameter[] { new SqlParameter("@condition", SqlDbType.NVarChar) };
            pt[0].Value = mssqlCondition.ToString();
            using (SqlDataReader reader = ShopMssqlHelper.ExecuteReader(ShopMssqlHelper.TablePrefix + "SearchEmailSendRecordList", pt))
            {
                this.PrepareEmailSendRecordModel(reader, emailSendRecordList);
            }
            return(emailSendRecordList);
        }
예제 #4
0
        /// <summary>
        /// 搜索邮件发送记录数据列表
        /// </summary>
        /// <param name="emailSendRecordSearch">EmailSendRecordSearchInfo模型变量</param>
        /// <returns>邮件发送记录数据列表</returns>
        public List <EmailSendRecordInfo> SearchEmailSendRecordList(EmailSendRecordSearchInfo emailSendRecordSearch)
        {
            string condition = PrepareCondition(emailSendRecordSearch).ToString();
            List <EmailSendRecordInfo> emailSendRecordList = new List <EmailSendRecordInfo>();

            SqlParameter[] parameters =
            {
                new SqlParameter("@condition", SqlDbType.NVarChar)
            };
            parameters[0].Value = condition;
            using (SqlDataReader dr = ShopMssqlHelper.ExecuteReader(ShopMssqlHelper.TablePrefix + "SearchEmailSendRecordList", parameters))
            {
                PrepareEmailSendRecordModel(dr, emailSendRecordList);
            }
            return(emailSendRecordList);
        }
예제 #5
0
 public void PrepareCondition(MssqlCondition mssqlCondition, EmailSendRecordSearchInfo emailSendRecordSearch)
 {
     mssqlCondition.Add("[IsSystem]", emailSendRecordSearch.IsSystem, ConditionType.Equal);
 }
예제 #6
0
        public List <EmailSendRecordInfo> SearchEmailSendRecordList(int currentPage, int pageSize, EmailSendRecordSearchInfo emailSendRecordSearch, ref int count)
        {
            List <EmailSendRecordInfo> emailSendRecordList = new List <EmailSendRecordInfo>();
            ShopMssqlPagerClass        class2 = new ShopMssqlPagerClass();

            class2.TableName   = ShopMssqlHelper.TablePrefix + "EmailSendRecord";
            class2.Fields      = "[ID],[Title],[Content],[IsSystem],[EmailList],[OpenEmailList],[IsStatisticsOpendEmail],[SendStatus],[Note],[AddDate],[SendDate]";
            class2.CurrentPage = currentPage;
            class2.PageSize    = pageSize;
            class2.OrderField  = "[ID]";
            class2.OrderType   = OrderType.Desc;
            this.PrepareCondition(class2.MssqlCondition, emailSendRecordSearch);
            class2.Count = count;
            count        = class2.Count;
            using (SqlDataReader reader = class2.ExecuteReader())
            {
                this.PrepareEmailSendRecordModel(reader, emailSendRecordList);
            }
            return(emailSendRecordList);
        }
예제 #7
0
 public static List <EmailSendRecordInfo> SearchEmailSendRecordList(int currentPage, int pageSize, EmailSendRecordSearchInfo emailSendRecord, ref int count)
 {
     return(dal.SearchEmailSendRecordList(currentPage, pageSize, emailSendRecord, ref count));
 }
예제 #8
0
 public static List <EmailSendRecordInfo> SearchEmailSendRecordList(EmailSendRecordSearchInfo emailSendRecord)
 {
     return(dal.SearchEmailSendRecordList(emailSendRecord));
 }