Beispiel #1
0
        protected void btnSaveClubMember_Click(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "SaveSuccessfully();", true);

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

            ccm.RegistrationId   = Convert.ToInt32(ddlSelectMember.SelectedValue);
            ccm.ClubId           = Convert.ToInt32(ClubID);
            ccm.ClubMemberTypeId = Convert.ToInt32(ddlMemberType.SelectedValue);
            ccm.ClubMemberDesc   = txtClubMemberDesc.Text.Trim();

            ccm.PortalID     = PortalId;
            ccm.CreatedById  = currentUser.Username;
            ccm.ModifiedById = currentUser.Username;

            // Call Save Method
            ccmc.InsertClubMember(ccm);

            btnAddClubMember.Visible  = true;
            pnlClubMemberGrid.Visible = true;
            FillClubName();
            LoadDocumentsGrid(ClubID);
            ClearData();
            //Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "", "mctl=" + "frmClubMember", "ClubID=" + ClubID));
        }
Beispiel #2
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();
            }
        }
Beispiel #3
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);
            }
        }
Beispiel #4
0
        private void FillClubMember()
        {
            clsClubMember           ccm  = new clsClubMember();
            clsClubMemberController ccmc = new clsClubMemberController();
            DataTable dt = new DataTable();

            dt = ccmc.GetClubMember();
            if (dt.Rows.Count > 0)
            {
                ddlSelectMember.DataSource     = dt;
                ddlSelectMember.DataTextField  = "ClubMemberName";
                ddlSelectMember.DataValueField = "RegistrationId";
                ddlSelectMember.DataBind();
                ddlSelectMember.Items.Insert(0, new ListItem("-- Select --", "0"));
            }
        }
Beispiel #5
0
        public void FillMemberType()
        {
            clsClubMember           ccm  = new clsClubMember();
            clsClubMemberController ccmc = new clsClubMemberController();
            DataTable dt = new DataTable();

            dt = ccmc.GetClubMemberType();
            if (dt.Rows.Count > 0)
            {
                ddlMemberType.DataSource     = dt;
                ddlMemberType.DataTextField  = "ClubMemberTypeValue";
                ddlMemberType.DataValueField = "ClubMemberTypeId";
                ddlMemberType.DataBind();
                ddlMemberType.Items.Insert(0, new ListItem("-- Select --", "0"));
            }
        }