protected void rGridStats_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { try { HiddenField hSeasonID = (HiddenField)Parent.FindControl("hddSeasonID"); HiddenField hPlayerGUID = (HiddenField)Parent.FindControl("hddPlayerGUID"); HiddenField hddPrimPosID = (HiddenField)Parent.FindControl("hddPrimPosID"); PickAPlayerDomainModel PlayerDrafted = new PickAPlayerDomainModel(); PlayerDrafted.PlayerGUID = new Guid(hPlayerGUID.Value.ToString()); PlayerDrafted.SeasonID = Convert.ToInt32(hSeasonID.Value); PlayerDrafted.PrimPositionTypeID = Convert.ToInt32(hddPrimPosID.Value); DataTable dt = sppsBLL.GetDynamicStats(PlayerDrafted); rGridStats.DataSource = dt; } catch (Exception ex) { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); string errMethod = sf.GetMethod().Name.ToString(); // Get the current method name string errMsg = "600"; // Gotta pass something, we're retro-fitting an existing method Session["LastException"] = ex; // Throw the exception in the session variable, will be used in error page string url = string.Format(ConfigurationManager.AppSettings["ErrorPageURL"], errMethod, errMsg); //Set the URL Response.Redirect(url); // Go to the error page. } }
protected static void GetStatView() { SeasonPlayerPositionStatBusinessLogic sppsBLL = new SeasonPlayerPositionStatBusinessLogic(); PickAPlayerDomainModel player = new PickAPlayerDomainModel(); player.PlayerGUID = new Guid("427D3393-3232-4E29-BAF2-18650072C736"); DataTable dt = sppsBLL.GetDynamicStats(player); }