Exemple #1
0
        /// <summary>
        /// 新增用户手机的验证码
        /// </summary>
        /// <param name="phoneNumber"></param>
        /// <param name="PhoneCode"></param>
        /// <param name="thisUrl"></param>
        /// <returns></returns>
        public int InsertPhoneCode(string phoneNumber, string PhoneCode, string thisIp)
        {
            rpt_mobilecode rpt_mobilecode = new rpt_mobilecode();

            rpt_mobilecode.Adddatetime   = DateTime.Now;
            rpt_mobilecode.Phonenumber   = phoneNumber;
            rpt_mobilecode.Validatecode  = PhoneCode;
            rpt_mobilecode.Loginip       = thisIp;
            rpt_mobilecode.Expirdatetime = DateTime.Now.AddHours(2.0);
            _db.rpt_mobilecode.Add(rpt_mobilecode);
            return(_db.SaveChanges());
        }
        public int UpdateCategoryMessage(AVGD.Rpt.Areas.Admin.Models.FormValue detail)
        {
            rpt_categorydetail rpt_categorydetail = _db.rpt_categorydetail.Where(category => category.Id == detail.report).FirstOrDefault();

            if (rpt_categorydetail != null)
            {
                _db.rpt_categorydetail.Attach(rpt_categorydetail);
                rpt_categorydetail.Order    = detail.sorttype;
                rpt_categorydetail.Sqlvalue = detail.sqlvalue;
                rpt_categorydetail.Sort     = detail.sortcolumn;
                rpt_categorydetail.Total    = detail.totalcolumn;
                return(_db.SaveChanges());
            }
            return(0);
        }