Пример #1
0
        protected void BindData()
        {
            try
            {
                string date_selected = get_date_string();
                lblDate.Text = Convert.ToDateTime(date_selected).ToString("D");

                DataTable dt = Function_Classes.get_from_sql("SELECT * FROM dbo.vw_Scores_Date WHERE date_game = '" + date_selected + "' ORDER BY game_ord", Variables.mlb_con_string, false);

                grdScores.DataSource = dt;
                grdScores.DataBind();
            }
            catch (Exception ex)
            {
                Function_Classes.write_error(ex, Page.AppRelativeVirtualPath.ToString());
            }
        }
Пример #2
0
        protected void BindData()
        {
            try
            {
                DataTable dt = Function_Classes.get_from_sql("SELECT * FROM dbo.vw_Standings_Current WHERE season = 2018 ORDER BY lg_name, div_rnk", Variables.mlb_con_string, false);

                CreateGridView(dt, "AL East", pnl_al);
                CreateGridView(dt, "AL Central", pnl_al);
                CreateGridView(dt, "AL West", pnl_al);

                CreateGridView(dt, "NL East", pnl_nl);
                CreateGridView(dt, "NL Central", pnl_nl);
                CreateGridView(dt, "NL West", pnl_nl);
            }
            catch (Exception ex)
            {
                Function_Classes.write_error(ex, Page.AppRelativeVirtualPath.ToString());
            }
        }