Update() 공개 메소드

public Update ( string pageName, SavedTabQuery query ) : SavedTabQuery
pageName string
query SavedTabQuery
리턴 SavedTabQuery
예제 #1
0
        public ActionResult Config(string pageName, string queryName, string queryId, [ModelBinder(typeof(BindingTypeAwareModelBinder))]object config)
        {
            var manager = new SavedTabQueryManager();
            ITabQuery query = null;
            SavedTabQuery savedQuery = null;

            if (!String.IsNullOrEmpty(queryId))
            {
                savedQuery = manager.Find(pageName, new Guid(queryId));
                query = TabQueries.GetQuery(savedQuery.QueryName);
            }
            else
            {
                savedQuery = new SavedTabQuery(queryName);
                query = TabQueries.GetQuery(queryName);
            }

            savedQuery.DisplayName = Request.Form["DisplayName"];

            if (query.ConfigType != null)
            {
                savedQuery.Config = config;
            }

            if (!String.IsNullOrEmpty(queryId))
            {
                manager.Update(pageName, savedQuery);
            }
            else
            {
                manager.Add(pageName, savedQuery);
            }

            return Json(savedQuery);
        }
예제 #2
0
 public void SaveOrders(string pageName, SavedTabQuery[] models)
 {
     var manager = new SavedTabQueryManager();
     foreach (var model in models)
     {
         var query = manager.Find(pageName, model.Id);
         query.Order = model.Order;
         manager.Update(pageName, query);
     }
 }