示例#1
0
        public JsonResult AjaxEditPropagandaArea(Propaganda_Area model)
        {
            SimpleJsonResult r = new SimpleJsonResult();

            if ((model.Id > 0 && _propagandaUserService.UpdatePropagandaArea(model) > 0) || (model.Id <= 0 && _propagandaUserService.AddPropagandaArea(model) > 0))
            {
                r.status = 1;
            }
            return(Json(r));
        }
示例#2
0
 public int UpdatePropagandaArea(Propaganda_Area model)
 {
     return(_db.ExecuteSqlCommand("update Propaganda_Area set Name=@Name,LatitudeStart=@LatitudeStart,LatitudeEnd=@LatitudeEnd,LongitudeStart=@LongitudeStart,LongitudeEnd=@LongitudeEnd where Id=@Id", model));
 }
示例#3
0
 public int AddPropagandaArea(Propaganda_Area model)
 {
     return(_db.ExecuteSqlCommand("insert Propaganda_Area (Name,LatitudeStart,LatitudeEnd,LongitudeStart,LongitudeEnd) values (@Name,@LatitudeStart,@LatitudeEnd,@LongitudeStart,@LongitudeEnd)", model));
 }