/// <summary>
        /// 写入一条记录
        /// </summary>
        /// <param name="Adviertisement"></param>
        /// <returns></returns>
        public bool InsertWarm_prompt(Model.Warm_prompt adv)
        {
            const string sql = @"INSERT INTO Warm_prompt(Content,CreateTime,UpdateTime) 
            VALUES(@Content,@CreateTime,@UpdateTime)";

            return(Factory.DBHelper.ExecSQL(SQLConString, sql.ToString(), new DynamicParameters(new
            {
                adv.Content,
                adv.CreateTime,
                adv.UpdateTime,
            })));
        }
Exemple #2
0
 public ActionResult Warm(Model.Warm_prompt warm)
 {
     try
     {
         Business.Sys_Adviertisement Sys_Adviertisement = new Business.Sys_Adviertisement();
         warm.CreateTime = DateTime.Now;
         warm.UpdateTime = DateTime.Now;
         Sys_Adviertisement.InsertWarm_prompt(warm);
         Response.Write("<script>parent.layer.closeAll();</script>");
         return(View());
     }
     catch (Exception ex)
     {
         Utility.Log.WriteTextLog("报错", "Adviertisement", "Add", "后台提交广告", "");
         return(null);
     }
 }