Beispiel #1
0
        /// <summary>
        /// 获取短信列表
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">短信内容</param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETDXGLLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string userName = UserInfo.User.UserName;
            string strWhere = " ComId=" + UserInfo.User.ComId + " And CRUser='******'";

            if (P1 != "")
            {
                strWhere += string.Format(" And  dxContent like '%{0}%'", P1);
            }
            string status = context.Request["status"] ?? "";

            if (status != "")
            {
                strWhere += string.Format(" And  SendTime{0}getdate()", status == "0"?"<":">");
            }
            int page      = 0;
            int pagecount = 8;

            int.TryParse(context.Request["p"] ?? "1", out page);
            int.TryParse(context.Request["pagecount"] ?? "8", out pagecount);//页数
            page = page == 0 ? 1 : page;
            int       total = 0;
            DataTable dt    = new SZHL_DXGLB().GetDataPager(" SZHL_DXGL ", "ID,dxContent,dxnums,SendTime,CRUser,CRDate,case when SendTime<=getdate() then '已发送' else '待发送' end as status", pagecount, page, " CRDate desc", strWhere, ref total);

            msg.Result  = dt;
            msg.Result1 = total;
        }
Beispiel #2
0
        //获取短信内容
        public void GETDXGLMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int       Id = int.Parse(P1);
            SZHL_DXGL sd = new SZHL_DXGLB().GetEntity(d => d.ID == Id && d.ComId == UserInfo.User.ComId);

            msg.Result = sd;
        }
Beispiel #3
0
        /// <summary>
        /// 删除短信信息
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">短信信息Id</param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void DELDXGL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            try
            {
                int ID = int.Parse(P1);
                var dx = new SZHL_DXGLB().GetEntity(d => d.ID == ID);
                if (dx.SendTime > DateTime.Now)
                {
                    new SZHL_TXSXB().Delete(p => p.MsgID == P1 && p.TXMode == "DXGL");
                }

                new SZHL_DXGLB().Delete(d => d.ID == ID);
            }
            catch (Exception ex)
            {
                msg.ErrorMsg = ex.Message;
            }
        }