Exemple #1
0
        private Constant.MailSendType getSendType()
        {
            Constant.MailSendType sendType = Constant.MailSendType.ALL;

            if ("未发送".Equals(cb_mail_status.Text))
            {
                sendType = Constant.MailSendType.UN_SEND;
            }
            else if ("已发送".Equals(cb_mail_status.Text))
            {
                sendType = Constant.MailSendType.SENDED;
            }

            return(sendType);
        }
Exemple #2
0
        public DataTable getStatistical(Constant.MailSendType sendType)
        {
            String sql = "select type,substr(create_date,1,10) as create_date,count(1) as num from t_mail_address where 1=1 ";

            if (Constant.MailSendType.SENDED.Equals(sendType))
            {
                sql += "and send_cnt > 0 ";
            }
            else if (Constant.MailSendType.UN_SEND.Equals(sendType))
            {
                sql += "and send_cnt = 0 ";
            }
            sql += "group by type,2 order by 1,2 desc";

            return(SQLiteUtils.query(sql));
        }
Exemple #3
0
        public DataTable get(String type, String createDate, Constant.MailSendType sendType, String mailAddressLike)
        {
            String sql = "select * from t_mail_address where 1=1 ";

            List <SQLiteParameter> paramList = new List <SQLiteParameter>();

            if (type != null && !"".Equals(type))
            {
                paramList.Add(new SQLiteParameter("@type", type));
                sql += "and type = @type ";
            }
            if (createDate != null && !"".Equals(createDate))
            {
                paramList.Add(new SQLiteParameter("@create_date", createDate + "%"));
                sql += "and create_date like @create_date ";
            }

            if (Constant.MailSendType.SENDED.Equals(sendType))
            {
                sql += "and send_cnt > 0 ";
            }
            else if (Constant.MailSendType.UN_SEND.Equals(sendType))
            {
                sql += "and send_cnt = 0 ";
            }

            if (mailAddressLike != null && !"".Equals(mailAddressLike))
            {
                paramList.Add(new SQLiteParameter("@mail_address", "%" + mailAddressLike + "%"));
                sql += "and mail_address like @mail_address ";
            }

            sql += " order by create_date";

            return(SQLiteUtils.query(sql, paramList));
        }