protected override void ShowData(int menuCategoryId) { oDetailButtonPanel.SetId = SetId; var data = new MenuCategoryDataModel(); data.MenuCategoryId = menuCategoryId; var items = MenuCategoryDataManager.GetEntityDetails(data, SessionVariables.RequestProfile); if (items.Count == 1) { var item = items[0]; lblMenuCategoryId.Text = item.MenuCategoryId.ToString(); lblName.Text = item.Name.ToString(); lblDescription.Text = item.Description.ToString(); lblSortOrder.Text = item.SortOrder.ToString(); oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction); oHistoryList.Setup(PrimaryEntity, menuCategoryId, "MenuCategoryId"); } else { Clear(); } }
public void LoadData(int menuCategoryId, bool showId) { Clear(); var data = new MenuCategoryDataModel(); data.MenuCategoryId = menuCategoryId; var items = MenuCategoryDataManager.GetEntityDetails(data, SessionVariables.RequestProfile); if (items.Count != 1) { return; } var item = items[0]; SetData(item); if (!showId) { SystemKeyId = item.MenuCategoryId; oHistoryList.Setup(PrimaryEntity, menuCategoryId, PrimaryEntityKey); } else { CoreSystemKey.Text = String.Empty; } }
public MenuCategoryDataModel GetById(string value) { var dataQuery = new MenuCategoryDataModel(); dataQuery.MenuCategoryId = int.Parse(value); var result = MenuCategoryDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile, 1); return(result[0]); }
// GET api/summary/GetList public IEnumerable <MenuCategoryDataModel> GetList(string value, string value1) { var settingCategory = value1; var searchString = value; var dictionaryObject = JsonConvert.DeserializeObject <Dictionary <string, string> >(searchString); // save search filter parameters in user preference if (dictionaryObject != null) { foreach (var searchFilterColumnName in dictionaryObject.Keys) { var searchFilterValue = dictionaryObject[searchFilterColumnName]; PerferenceUtility.UpdateUserPreference(settingCategory, searchFilterColumnName, dictionaryObject[searchFilterColumnName]); } } var dataQuery = JsonConvert.DeserializeObject <MenuCategoryDataModel>(searchString); return(MenuCategoryDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile)); }