예제 #1
0
        private void FillClubName()
        {
            clsClubOwner           cco  = new clsClubOwner();
            clsClubOwnerController ccoc = new clsClubOwnerController();

            DataTable dt = new DataTable();

            dt = ccoc.GetClubNameByClubID(ClubID);

            if (dt.Rows.Count > 0)
            {
                lbl_Club_Name.Text = dt.Rows[0]["ClubName"].ToString();
            }
        }
예제 #2
0
        protected void ddlAction_SelectedIndexChanged(object sender, EventArgs e)
        {
            string str = ((Label)((DropDownList)sender).Parent.FindControl("lblddlActionClubOwnersId")).Text;

            string ddlSelectedValue = ((DropDownList)sender).SelectedValue;

            if (ddlSelectedValue == "Edit")
            {
                ClearData();
                FillClubOwner();
                int editid = 0;
                int.TryParse(str, out editid);
                ViewState["currentId"] = Convert.ToInt16(str);

                clsClubOwner           cco  = new clsClubOwner();
                clsClubOwnerController ccoc = new clsClubOwnerController();

                DataTable dt = new DataTable();
                dt = ccoc.GetClubNameByClubID(ClubID);
                if (dt.Rows.Count > 0)
                {
                    lbl_Club_Name.Text = dt.Rows[0]["ClubName"].ToString();
                }

                DataTable dt1 = new clsClubOwnerController().GetClubOwnerDetailByClubOwnerID(editid);

                if (dt1.Rows.Count > 0)
                {
                    ddlClubOwner.SelectedValue   = dt1.Rows[0]["RegistrationId"].ToString();
                    ViewState["regid"]           = dt1.Rows[0]["RegistrationId"].ToString();
                    txtClubOwnerDescription.Text = dt1.Rows[0]["OwnerDescription"].ToString();
                    txtClubOwnerPercentage.Text  = dt1.Rows[0]["OwnerPercentage"].ToString();
                }

                btnUpdateClubOwner.Visible = true;
                btnSaveClubOwner.Visible   = false;
                pnlClubOwnerEntry.Visible  = true;
                pnlClubOwnerGrid.Visible   = false;
            }
            else if (ddlSelectedValue == "Delete")
            {
                //Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "DeleteSuccessfully();", true);
                //int documentid = 0;
                //int.TryParse(str, out documentid);
                //new CompetitionSponsorController().DeleteCompeSpon(documentid);
                //LoadDocumentsGrid(CompetitionID);
            }
        }