Ejemplo n.º 1
0
 public JsonResult addDominant(JiaJiModels.DominantModel infor)
 {
     try
     {
         var i = new JiaJiBLL.DoBLL().addDominant(infor);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
Ejemplo n.º 2
0
        public JsonResult editDominant(JiaJiModels.DominantModel model)
        {
            try
            {
                int id = model.CountryDominantID;

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