Exemplo n.º 1
0
    public static bool AddToSendSms(string receiver, eTemplateType tempType, params string[] args)
    {
        string template = GetSmsTemplate(tempType);

        if (template.Equals(""))
        {
            return(false);
        }
        string         content = string.Format(template, args);
        SMSTOSENDModel model   = new SMSTOSENDModel();

        model.CONTENT     = content;
        model.CREATETIME  = DateTime.Now;
        model.CREATEUSER  = UI.Web.CurrentUser.UserName;
        model.RECEIVEUSER = receiver;
        model.SMSBASTYPE  = "";
        model.SMSTEMPTYPE = ((int)tempType).ToString();
        model.STATUS      = "0";

        return(model.Insert());
    }
Exemplo n.º 2
0
        public ActionResult SendSmsRetry(RequestData data)
        {
            bool    result = false;
            dynamic log    = SqlModel.SelectAll().From(DB.SMSLOG).Where(SMSLOG.ID == data.Get("id")).ExecToDynamic();

            if (log != null)
            {
                SMSTOSENDModel model = new SMSTOSENDModel();
                model.CONTENT     = log["CONTENT"];
                model.CREATETIME  = DateTime.Now;
                model.CREATEUSER  = UI.Web.CurrentUser.UserName;
                model.RECEIVEUSER = log["RECEIVEUSER"];
                model.SMSBASTYPE  = "";
                model.SMSTEMPTYPE = log["SMSTEMPTYPE"];
                model.STATUS      = "0";
                result            = model.Insert();
            }
            return(Json(new
            {
                Success = result
            }
                        ));
        }