Пример #1
0
        private void FillClubName()
        {
            clsClubMember           ccm  = new clsClubMember();
            clsClubMemberController ccmc = new clsClubMemberController();

            DataTable dt = new DataTable();

            dt = ccmc.GetClubNameByClubID(ClubID);

            if (dt.Rows.Count > 0)
            {
                lbl_Club_Member.Text = dt.Rows[0]["ClubName"].ToString();
            }
        }
Пример #2
0
        protected void ddlAction_SelectedIndexChanged(object sender, EventArgs e)
        {
            string str = ((Label)((DropDownList)sender).Parent.FindControl("lblddlActionClubMemberId")).Text;

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

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

                clsClubMember           ccm  = new clsClubMember();
                clsClubMemberController ccmc = new clsClubMemberController();

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

                FillMemberType();
                FillClubMember();
                ClearData();
                DataTable dt1 = new clsClubMemberController().GetClubMemberDetailByClubMemberID(editid);

                if (dt1.Rows.Count > 0)
                {
                    ViewState["regid"]            = dt1.Rows[0]["RegistrationId"].ToString();
                    ddlSelectMember.SelectedValue = dt1.Rows[0]["RegistrationId"].ToString();
                    ddlMemberType.SelectedValue   = dt1.Rows[0]["ClubMemberTypeId"].ToString();
                    txtClubMemberDesc.Text        = dt1.Rows[0]["ClubMemberDesc"].ToString();
                }

                btnUpdateClubMember.Visible = true;
                btnSaveClubMember.Visible   = false;
                pnlClubMemberEntry.Visible  = true;
                pnlClubMemberGrid.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);
            }
        }