Exemplo n.º 1
0
    protected void btnSave_Click(object sender, ImageClickEventArgs e)
    {
        if (IsCorrectEntries())
        {
            int intRecordsAffected = 0;

            int      gameID       = hdnGameID.Value.ToInt();
            string   gamePhase    = ddlGamePhase.SelectedValue;
            DateTime startDate    = clsValidator.CheckDate(txtStartYear.Text.ToInt(), ddlStartMonth.SelectedValue.ToInt(), ddlStartDay.SelectedValue.ToInt(), ddlStartHour.SelectedValue.ToInt(), ddlStartMinute.SelectedValue.ToInt(), ddlStartTimePeriod.SelectedValue);
            DateTime endDate      = clsValidator.CheckDate(txtEndYear.Text.ToInt(), ddlEndMonth.SelectedValue.ToInt(), ddlEndDay.SelectedValue.ToInt(), ddlEndHour.SelectedValue.ToInt(), ddlEndMinute.SelectedValue.ToInt(), ddlEndTimePeriod.SelectedValue);
            string   location     = txtLocation.Text;
            int      winnerTeamID = ddlWinner.SelectedValue.ToInt();
            bool     isFinished   = chkFinished.Checked;
            string   modifiedBy   = Request.Cookies["Speedo"]["UserName"];
            intRecordsAffected = DALPortal.UpdateEventGames(gameID, gamePhase, startDate, endDate, location, winnerTeamID, isFinished, modifiedBy);

            if (intRecordsAffected > 0)
            {
                Response.Redirect("EventDetails.aspx?eventid=" + Request.QueryString["eventid"]);
            }
        }
    }