protected void Page_Load(object sender, EventArgs e) { SiteMaster.SetAppID(AppID.ItemDistributionManager); _fetchList = (state) => { var user = Session[SKeys.User] as User; var distroDays = ItemTable.GetDistributionDays(user); distroBox.Text = distroDays.ToString(); sunCheckbox.Checked = distroDays.IsSunday; monCheckbox.Checked = distroDays.IsMonday; tueCheckbox.Checked = distroDays.IsTuesday; wedCheckbox.Checked = distroDays.IsWednesday; thuCheckbox.Checked = distroDays.IsThursday; friCheckbox.Checked = distroDays.IsFriday; satCheckbox.Checked = distroDays.IsSaturday; minDollarBox.Value = minDollarLabel.InnerText = distroDays.MinDollars.ToString(); dayRangeBox.Value = dayRangeLabel.InnerText = distroDays.DayRange.ToString(); var itemData = ItemTable.GetItemData(user); editGrid.DataSource = itemData; editGrid.DataBind(); editGrid.HeaderRow.TableSection = System.Web.UI.WebControls.TableRowSection.TableHeader; itemGrid.DataSource = itemData; itemGrid.DataBind(); itemGrid.HeaderRow.TableSection = System.Web.UI.WebControls.TableRowSection.TableHeader; }; Page.RegisterAsyncTask(new PageAsyncTask((sndr, args, callback, extraData) => { return(_fetchList.BeginInvoke(HttpContext.Current.Session, callback, extraData)); }, empty => { }, empty => { }, null)); }
protected void Page_Load(object sender, EventArgs e) { SiteMaster.SetAppID(AppID.ChangePO); _fetchList = (state) => { CPODetails = JsonConvert.SerializeObject(ChangePOTracker.GetChangeList(Session[SKeys.User] as User)); }; Page.RegisterAsyncTask(new PageAsyncTask((sndr, args, callback, extraData) => { return(_fetchList.BeginInvoke(HttpContext.Current.Session, callback, extraData)); }, empty => { }, empty => { }, null)); }
protected void Page_Load(object sender, EventArgs e) { SiteMaster.SetAppID(AppID.SalesRequest); _fetchList = (state) => { var user = Session[SKeys.User] as User; storeList = JsonConvert.SerializeObject(SalesRequestManager.GetStoreList(user)); retailWeekList = JsonConvert.SerializeObject(SalesRequestManager.GetRetailWeeks(user)); partnerEmail = user.Email; var pastReqs = SalesRequestManager.GetPastOrders(user); pastOrderGrid.DataSource = pastReqs; pastOrderGrid.DataBind(); if (pastReqs.Count > 0) { pastOrderGrid.HeaderRow.TableSection = System.Web.UI.WebControls.TableRowSection.TableHeader; } }; Page.RegisterAsyncTask(new PageAsyncTask((sndr, args, callback, extraData) => { return(_fetchList.BeginInvoke(HttpContext.Current.Session, callback, extraData)); }, empty => { }, empty => { }, null)); }