コード例 #1
0
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            JudgeAddScoresBLL loadGrid = new JudgeAddScoresBLL();
            DataTable         dt       = loadGrid.LoadGrid(ddlLoadDate.SelectedValue.ToString());

            if (dt.Rows.Count == 0)
            {
                GridView1.Visible           = false;
                lblStatusGetDetails.Visible = true;
                lblStatusGetDetails.Text    = "You have not selected appointment date";
            }
            else
            {
                lblStatusGetDetails.Visible = false;
                GridView1.Visible           = true;
                GridView1.DataSource        = dt;
                GridView1.DataBind();

                if (dt.Rows[0]["SubmissionURL"].ToString() != "Not submitted yet")
                {
                    ButtonScores.Visible = true;
                }
            }
        }
コード例 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (ddlLoadDate.SelectedItem.Value == "-1")
            {
                lblStatusGetDetails.Visible = true;
                GridView1.Visible           = false;
            }
            else
            {
                JudgeAddScoresBLL loadGrid = new JudgeAddScoresBLL();
                DataTable         dt       = loadGrid.LoadGrid(ddlLoadDate.SelectedValue.ToString());
                if (dt.Rows.Count == 0)
                {
                    GridView1.Visible           = false;
                    lblStatusGetDetails.Visible = true;
                    lblStatusGetDetails.Text    = "You have not selected appointment date";
                }
                else
                {
                    lblStatusGetDetails.Visible = false;
                    GridView1.Visible           = true;
                    GridView1.DataSource        = dt;
                    GridView1.DataBind();

                    if (dt.Rows[0]["SubmissionURL"].ToString() != "Not submitted yet")
                    {
                        ButtonScores.Visible = true;
                    }
                    else
                    {
                        lblStatusGetDetails.Visible = true;
                        lblStatusGetDetails.Text    = "You are unable to score as the URL is not submitted yet.";
                    }
                }
            }
        }