コード例 #1
0
 /// <summary>
 /// 修改二维码
 /// </summary>
 /// <returns></returns>
 public int UpdateErWeiMa(JiaJiModels.ErWeiMaModel model)
 {
     try
     {
         return(new JiaJiDAL.ImageDal().UpdateErWeiMa(model));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
コード例 #2
0
 /// <summary>
 /// 修改二维码
 /// </summary>
 /// <returns></returns>
 public int UpdateErWeiMa(JiaJiModels.ErWeiMaModel model)
 {
     try
     {
         string sql = "Update erweimainfo set EWMTitle = '" + model.EWMTitle + "', EWMUrl = '" + model.EWMUrl + "', EWMUpdate = '" + model.EWMUpdate + "' where EWMID=" + model.EWMID + " ";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
コード例 #3
0
 /// <summary>
 /// 添加二维码
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddErWeiMa(JiaJiModels.ErWeiMaModel model)
 {
     try
     {
         string sql = "INSERT INTO erweimainfo (EWMTitle, EWMUrl, EWMUpdate)VALUES ('" + model.EWMTitle + "', '" + model.EWMUrl + "', '" + model.EWMUpdate + "')";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
コード例 #4
0
 public JsonResult addErWeiMaPage(JiaJiModels.ErWeiMaModel model)
 {
     try
     {
         model.EWMUrl = "/image/" + model.EWMUrl;
         var i = new JiaJiBLL.ImageBll().AddErWeiMa(model);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
コード例 #5
0
        public JsonResult editErWeiMaPage(JiaJiModels.ErWeiMaModel model)
        {
            try
            {
                int id = model.EWMID;

                var i = new JiaJiBLL.ImageBll().UpdateErWeiMa(model);
                if (i > 0)
                {
                    return(Json(new { Success = true, Message = "修改成功" }));
                }
                else
                {
                    return(Json(new { Success = false, Message = "修改失败" }));
                }
            }
            catch
            {
                return(Json(new { Success = false, Message = "修改失败" }));
            }
        }