Esempio n. 1
0
        public bool AlterUsed(RequestData data)
        {
            SMSTEMPLATEModel model  = new SMSTEMPLATEModel();
            string           isused = data.Get("isused");

            model.ISUSE = isused == "checked" ? "1" : "0";
            return(model.Update(SMSTEMPLATE.ID == data.Get("id")));
        }
Esempio n. 2
0
        protected override bool DoEdit(RequestData data)
        {
            SMSTEMPLATEModel model = new SMSTEMPLATEModel();

            model            = this.GetModelValue <SMSTEMPLATEModel>(model, data);
            model.SMSBASTYPE = "0";
            if (model.ISUSE == null)
            {
                model.ISUSE = "0";
            }
            else
            {
                model.ISUSE = "1";
            }
            return(model.Update(SMSTEMPLATE.ID == data.Get("id")));
        }
Esempio n. 3
0
        protected override bool DoAdd(RequestData data)
        {
            SMSTEMPLATEModel model = new SMSTEMPLATEModel();

            model            = this.GetModelValue <SMSTEMPLATEModel>(model, data);
            model.SMSBASTYPE = "0";
            model.CREATETIME = DateTime.Now;
            model.CREATEUSER = CurrentUser.UserName;
            if (model.ISUSE == null)
            {
                model.ISUSE = "0";
            }
            else
            {
                model.ISUSE = "1";
            }
            return(model.Insert());
        }
Esempio n. 4
0
        protected override bool DoDelete(RequestData data)
        {
            SMSTEMPLATEModel model = new SMSTEMPLATEModel();

            return(model.Update(SMSTEMPLATE.ID == data.Get("id")));
        }