Exemplo n.º 1
0
        public JsonResult addCountryInfo(JiaJiModels.country model)
        {
            try
            {
                model.CountryImg        = "/image/" + model.CountryImg;
                model.CountryImg2       = "/image/" + model.CountryImg2;
                model.CountryActiveImg1 = "/image/" + model.CountryActiveImg1;
                model.CountryActiveImg2 = "/image/" + model.CountryActiveImg2;


                var i = new JiaJiBLL.SprelationBll().AddCountry(model);
                if (i > 0)
                {
                    return(Json(new { Success = true, Message = "添加成功" }));
                }
                else
                {
                    return(Json(new { Success = false, Message = "添加失败" }));
                }
            }
            catch
            {
                return(Json(new { Success = false, Message = "添加失败" }));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 添加YBY
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddLBY(JiaJiModels.country model)
 {
     try
     {
         return(new JiaJiDAL.SprelationDal().AddLBY(model));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 修改国家
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdCountry(JiaJiModels.country model)
 {
     try
     {
         string sql = " update country set CountryName='" + model.CountryName + "',CountryYouShi='" + model.CountryYouShi + "',CountryImg='" + model.CountryImg + "',CountryImg2='" + model.CountryImg2 + "',CountryActiveImg1='" + model.CountryActiveImg1 + "',CountryActiveImg2='" + model.CountryActiveImg2 + "' where CountryID=" + model.CountryID + " ";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// 添加YBY
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddLBY(JiaJiModels.country model)
 {
     try
     {
         string sql = " INSERT into country(CountryName,CountryYouShi,CountryImg,CountryImg2,IsCountry) values('" + model.CountryName + "', '" + model.CountryYouShi + "', '" + model.CountryImg + "', '" + model.CountryImg2 + "',0)";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 5
0
        public JsonResult editLanBgYi(JiaJiModels.country model)
        {
            try
            {
                int id = model.CountryID;

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