protected void btnUpdateUserType_Click(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "UpdateSuccessfully();", true);

            clsUserType           ccm  = new clsUserType();
            clsUserTypeController ccmc = new clsUserTypeController();

            ccm.UserTypeId   = Convert.ToInt16(currentId);
            ccm.UserTypeName = txtUserType.Text.Trim();
            ccm.UserTypeAbbr = txtUserTypeAddress.Text.Trim();
            ccm.UserTypeDesc = txtUserTypeDesc.Text.Trim();

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

            // Call Update Method
            ccmc.UpdateUserType(ccm);

            btnAddUserType.Visible    = true;
            pnlUserTypeGrid.Visible   = true;
            btnSaveUserType.Visible   = true;
            btnUpdateUserType.Visible = false;
            LoadDocumentsGrid();
            ClearData();
            //Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "", "mctl=" + "frmClubMember", "ClubID=" + ClubID));
        }
        protected void ddlAction_SelectedIndexChanged(object sender, EventArgs e)
        {
            string str = ((Label)((DropDownList)sender).Parent.FindControl("lblddlActionUserTypeId")).Text;

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

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

                clsUserType           ccm  = new clsUserType();
                clsUserTypeController ccmc = new clsUserTypeController();

                ClearData();
                DataTable dt1 = new clsUserTypeController().GetUserTypeDetailByUserTypeID(editid);

                if (dt1.Rows.Count > 0)
                {
                    txtUserType.Text        = dt1.Rows[0]["UserTypeName"].ToString();
                    txtUserTypeAddress.Text = dt1.Rows[0]["UserTypeAbbr"].ToString();
                    txtUserTypeDesc.Text    = dt1.Rows[0]["UserTypeDesc"].ToString();
                }

                btnUpdateUserType.Visible = true;
                btnSaveUserType.Visible   = false;
                pnlUserTypeEntry.Visible  = true;
                pnlUserTypeGrid.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);
            }
        }