示例#1
0
 public JsonResult update(Entity.MapRouteInfo info)
 {
     using (var manage = new Data.MapRouteManage())
     {
         manage.update(info);
         return(getResult(manage.Error, manage.Message));
     }
 }
示例#2
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="info"></param>
 public bool update(Entity.MapRouteInfo info)
 {
     if (info.MapRouteId <= 0)
     {
         this.dbContext.MapRoute.Add(info);
     }
     else
     {
         this.dbContext.Entry(info).State = System.Data.Entity.EntityState.Modified;
     }
     if (this.dbContext.SaveChanges() > 0)
     {
         updateBasicMapRouteConfig();
         return(true);
     }
     return(false);
 }