private void FillTeams() { DataTable dt = new DataTable(); dt = teamControl.GetMasterTeamsNotInCompetitionTeam(CompetitionID); if (dt.Rows.Count > 0) { rptrForTeams.Visible = true; rptrForTeams.DataSource = dt; rptrForTeams.DataBind(); } else { rptrForTeams.Visible = false; } DataTable CompetitionDetails = cController.GetCompetitionDetailByCompetitionID(CompetitionID); if (CompetitionDetails.Rows.Count > 0) { if (!string.IsNullOrEmpty(CompetitionDetails.Rows[0]["CompetitionName"].ToString())) { txtCompetitionName.Text = CompetitionDetails.Rows[0]["CompetitionName"].ToString(); lbl_Competition_Name.Text = CompetitionDetails.Rows[0]["CompetitionName"].ToString(); } } }
private void bindCompetitionDetails() { DataTable dt = new DataTable(); dt = cmpController.GetCompetitionDetailByCompetitionID(CompetitionID); litCompetitionHistory.Text = dt.Rows[0]["CompetitionDesc"].ToString(); lblCompetitionTitle.Text = dt.Rows[0]["CompetitionName"].ToString(); ImgCompetitionPhoto.ImageUrl = dt.Rows[0]["CompetitionLogoFile"].ToString(); ImgCompetitionPhoto.AlternateText = dt.Rows[0]["CompetitionName"].ToString(); }
protected void ddlAction_SelectedIndexChanged(object sender, EventArgs e) { hdnCompetitionID.Value = ((HiddenField)((DropDownList)sender).Parent.FindControl("hdn_Competition_Id")).Value; string ddlSelectedValue = ((DropDownList)sender).SelectedValue; if (ddlSelectedValue == "Edit") { ClearData(); DataTable dt1 = clc.GetCompetitionDetailByCompetitionID(competitionID); if (dt1.Rows.Count > 0) { txtCompetition.Text = dt1.Rows[0]["CompetitionName"].ToString(); txtCompetitionDesc.Text = dt1.Rows[0]["CompetitionDesc"].ToString(); txtCompetitionAbbr.Text = dt1.Rows[0]["CompetitionAbbr"].ToString(); txtNoOfGroup.Text = dt1.Rows[0]["NumberofGroups"].ToString(); txtNoOfTeam.Text = dt1.Rows[0]["NumberofTeams"].ToString(); ddlSeason.SelectedValue = dt1.Rows[0]["SeasonId"].ToString(); ddlCompetitionLeague.SelectedValue = dt1.Rows[0]["CompetitionLeagueId"].ToString(); ddlSport.SelectedValue = dt1.Rows[0]["SportId"].ToString(); ddlCompetitionType.SelectedValue = dt1.Rows[0]["CompetitionTypeId"].ToString(); ddlDivision.SelectedValue = dt1.Rows[0]["DivisionId"].ToString(); ddlCompetitionFormat.SelectedValue = dt1.Rows[0]["CompetitionFormatId"].ToString(); DateTime startDate = new DateTime(); DateTime endDate = new DateTime(); DateTime.TryParse(dt1.Rows[0]["StartDate"].ToString(), out startDate); DateTime.TryParse(dt1.Rows[0]["EndDate"].ToString(), out endDate); txtStartDate.Text = startDate.ToString("yyyy/MM/dd HH':'mm"); txtEndDate.Text = endDate.ToString("yyyy/MM/dd HH':'mm"); txtCompetitionLogoName.Text = dt1.Rows[0]["CompetitionLogoName"].ToString(); CompetitionLogoImage.ImageUrl = dt1.Rows[0]["CompetitionLogoFile"].ToString(); string ufname = dt1.Rows[0]["CompetitionLogoFile"].ToString().Replace(" ", ""); CompetitionLogoImage.ResolveUrl("ufname"); txtWin.Text = dt1.Rows[0]["WinPoint"].ToString(); txtLose.Text = dt1.Rows[0]["LossPoint"].ToString(); txtDraw.Text = dt1.Rows[0]["DrawPoint"].ToString(); txtNoShowGoal.Text = dt1.Rows[0]["NoShowGoalPoint"].ToString(); if (dt1.Rows[0]["ActiveFlagId"].ToString() == "1") { ChkIsActive.Checked = true; } if (dt1.Rows[0]["ShowFlagId"].ToString() == "1") { ChkIsShow.Checked = true; } } ddlDivision.Enabled = false; btnUpdateCompetition.Visible = true; btnSaveCompetition.Visible = false; pnlCompetitionEntry.Visible = true; pnlCompetitionGrid.Visible = false; } else if (ddlSelectedValue == "Group") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "", "mctl=" + "frmCompetitionGroup", "CompetitionID=" + competitionID)); } else if (ddlSelectedValue == "Match") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "", "mctl=" + "frmCompetitionMatch", "CompetitionID=" + competitionID)); } else if (ddlSelectedValue == "Delete") { if (clc.IsCompetitionHasOtherData(competitionID).Rows[0]["RefData"].ToString() != "") { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "validateAndConfirm1('" + "Delete" + "');;", true); } else { DeleteCompetition(); } } else if (ddlSelectedValue == "Team") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "", "mctl=" + "frmCompetitionTeam", "CompetitionID=" + competitionID)); } }