예제 #1
0
        protected void SubCatBindValues()
        {
            DropDownList l_SubCategory = ((DropDownList)((TabContainer)SubCategoryAddEditStep.ContentTemplateContainer.
                                                         FindControl("tabCont")).Tabs[1].FindControl("ddlSubCategory"));

            AddSubcat l_AddSubcat = ((AddSubcat)((TabContainer)SubCategoryAddEditStep.
                                                 ContentTemplateContainer.FindControl("tabCont")).Tabs[0].FindControl("AddSubcat1"));

            l_AddSubcat.ClearAll();

            EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                       FindControl("EditSubcat1"));

            l_EditSubcat.SubCatID = this.SubcatID = System.Convert.ToInt32(l_SubCategory.SelectedItem.Value);
            l_EditSubcat.BindValues();
        }
예제 #2
0
        protected void lnkSubCategories_Click(object sender, EventArgs e)
        {
            DropDownList l_SubCategory = ((DropDownList)((TabContainer)SubCategoryAddEditStep.
                                                         ContentTemplateContainer.FindControl("tabCont")).Tabs[1].FindControl("ddlSubCategory"));

            l_SubCategory.SelectedIndex = 0;

            EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                       FindControl("EditSubcat1"));

            l_EditSubcat.SubCatID = this.SubcatID;
            l_EditSubcat.BindValues();

            this.DecrementWizardPage();
            this.EnableSubcategoryEditTab();
            this.hidSubCatIndex.Value = "1";
        }
예제 #3
0
        protected void EditSubcat1EditSubsubcat_Click(object sender, EventArgs e)
        {
            Session[PubEntAdminManager.strCurrCatName] =
                ((Label)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("lblCategoryStep")).Text;

            EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                       FindControl("EditSubcat1"));

            Session[PubEntAdminManager.strCurrSubcatName] = l_EditSubcat.SubCatName;

            if (PubEntAdminManager.TamperProof)
            {
                PubEntAdminManager.RedirectEncodedURLWithQS("LookupMgmt.aspx", "sub=subsubcat&mode=edit&subcatid=" + l_EditSubcat.SubCatID);
            }
            else
            {
                Response.Redirect("~/LookupMgmt.aspx?sub=subsubcat&mode=edit&subcatid=" + l_EditSubcat.SubCatID);
            }
        }
예제 #4
0
        protected void EditSubcat1Cancel_Click(object sender, EventArgs e)
        {
            ((Label)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("lblCategoryStep")).Text =
                ((DropDownList)CategoryStep.ContentTemplateContainer.FindControl("ddlCategory")).SelectedItem.Text;

            DropDownList l_SubCategory = ((DropDownList)((MultiView)SubCategoryAddEditStep.
                                                         ContentTemplateContainer.FindControl("MultiView1")).Views[1].FindControl("ddlSubCategory"));

            l_SubCategory.SelectedIndex = 0;

            EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                       FindControl("EditSubcat1"));

            l_EditSubcat.SubCatID = this.SubcatID;
            l_EditSubcat.BindValues();

            this.DecrementWizardPage();
            this.EnableSubcategoryEditTab();
            this.hidSubCatIndex.Value = "1";
        }
예제 #5
0
        public string GetSpellCheckParticipants()
        {
            string partipants = "";

            if (this.SubCatWizard.ActiveStepIndex == 1)
            {
                AddSubcat l_AddSubcat = ((AddSubcat)((TabContainer)SubCategoryAddEditStep.
                                                     ContentTemplateContainer.FindControl("tabCont")).Tabs[0].FindControl("AddSubcat1"));

                partipants = l_AddSubcat.SubCatTextClientID;
            }
            else if (this.SubCatWizard.ActiveStepIndex == 2)
            {
                EditSubcat l_EditSubcat = ((EditSubcat)(SubCategoryEditStep.
                                                        ContentTemplateContainer.FindControl("EditSubcat1")));

                partipants = l_EditSubcat.SubCatTextClientID;
            }

            return(partipants);
        }
예제 #6
0
        protected void EditSubcat1Del_Click(object sender, EventArgs e)
        {
            ((Label)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("lblCategoryStep")).Text =
                ((DropDownList)CategoryStep.ContentTemplateContainer.FindControl("ddlCategory")).SelectedItem.Text;

            EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                       FindControl("EditSubcat1"));

            int  l_subcatid    = l_EditSubcat.SubCatID;
            bool blnSaveSubCat = PE_DAL.SetSubCat(ref l_subcatid, l_EditSubcat.SubCatName,
                                                  l_EditSubcat.AssignToSubjID, System.Convert.ToInt32(l_EditSubcat.AllowHvSubSubCat), 0);

            if (blnSaveSubCat)
            {
                //DropDownList l_SubCategory = ((DropDownList)((TabContainer)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("tabCont")).Tabs[1].FindControl("ddlSubCategory"));

                this.DecrementWizardPage();
                this.EnableSubcategoryEditTab();
                this.EditSubCatBindOptions(l_EditSubcat.AssignToSubjID);
                this.hidSubCatIndex.Value = "1";
            }
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.hidSubCatIndex.Value = "";

            if (PubEntAdminManager.TamperProof)
            {
                if (PubEntAdminManager.ContainURLQS("subcatid"))
                {
                    this.SubcatID = System.Convert.ToInt32(PubEntAdminManager.GetURLQS("subcatid"));
                }
            }
            else
            {
                if (Request.QueryString["subcatid"] != null)
                {
                    this.SubcatID = System.Convert.ToInt32(Request.QueryString["subcatid"].ToString());
                }
            }

            if (PubEntAdminManager.TamperProof)
            {
                if (PubEntAdminManager.ContainURLQS("mode"))
                {
                    this.SubcatMode = (PubEntAdminManager.GetURLQS("mode"));
                }
            }
            else
            {
                if (Request.QueryString["mode"] != null)
                {
                    this.SubcatMode = (Request.QueryString["mode"].ToString());
                }
            }

            if (!Page.IsPostBack)
            {
                this.SubCatWizard.ActiveStepIndex = 0;
                this.CategoryBindOptions();

                if (this.SubcatID > 0)
                {
                    this.IncrementWizardPage();

                    EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                               FindControl("EditSubcat1"));
                    l_EditSubcat.BindOptions();
                    l_EditSubcat.SubCatID = this.SubcatID;
                    l_EditSubcat.BindValues();
                    this.IncrementWizardPage();

                    PubEntAdmin.BLL.SubCat l_SubCat = PE_DAL.GetSubCatBySubCatID2(this.SubcatID);
                    ((Label)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("lblCategoryStep")).Text   =
                        ((Label)SubCategoryEditStep.ContentTemplateContainer.FindControl("lblCategoryStep2")).Text = l_SubCat.AssignedCatName;
                    this.AddSubCatBindOptions(l_SubCat.AssignedCatID);
                    this.EditSubCatBindOptions(l_SubCat.AssignedCatID);
                }
                else
                {
                }
            }

            this.SecVal();
        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.hidSubCatIndex.Value = "";

            if (PubEntAdminManager.TamperProof)
            {
                if (PubEntAdminManager.ContainURLQS("subcatid"))
                {
                    this.SubcatID = System.Convert.ToInt32(PubEntAdminManager.GetURLQS("subcatid"));
                }
            }
            else
            {
                if (Request.QueryString["subcatid"] != null)
                {
                    this.SubcatID = System.Convert.ToInt32(Request.QueryString["subcatid"].ToString());
                }
            }

            if (PubEntAdminManager.TamperProof)
            {
                if (PubEntAdminManager.ContainURLQS("mode"))
                {
                    this.SubcatMode = (PubEntAdminManager.GetURLQS("mode"));
                }
            }
            else
            {
                if (Request.QueryString["mode"] != null)
                {
                    this.SubcatMode = (Request.QueryString["mode"].ToString());
                }
            }

            if (!Page.IsPostBack)
            {
                this.SubCatWizard.ActiveStepIndex = 0;
                this.CategoryBindOptions();

                if (this.SubcatID > 0)
                {
                    this.IncrementWizardPage();

                    EditSubcat l_EditSubcat = ((EditSubcat)SubCategoryEditStep.ContentTemplateContainer.
                                               FindControl("EditSubcat1"));
                    l_EditSubcat.BindOptions();
                    l_EditSubcat.SubCatID = this.SubcatID;
                    l_EditSubcat.BindValues();
                    this.IncrementWizardPage();

                    PubEntAdmin.BLL.SubCat l_SubCat = PE_DAL.GetSubCatBySubCatID2(this.SubcatID);
                    ((Label)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("lblCategoryStep")).Text   =
                        ((Label)SubCategoryEditStep.ContentTemplateContainer.FindControl("lblCategoryStep2")).Text = l_SubCat.AssignedCatName;
                    this.AddSubCatBindOptions(l_SubCat.AssignedCatID);
                    this.EditSubCatBindOptions(l_SubCat.AssignedCatID);
                    ((Button)SubCatWizard.FindControl("FinishNavigationTemplateContainerID").FindControl("FinishButton")).Visible = false;
                }
                else
                {
                }
            }
            List <TabItem> l  = new List <TabItem>();
            TabItem        t1 = new TabItem(0, "Add", "LookupMgmt.aspx");
            TabItem        t2 = new TabItem(1, "Edit", "LookupMgmt.aspx");

            l.Add(t1);
            l.Add(t2);

            ((TabStrip)SubCategoryAddEditStep.ContentTemplateContainer.FindControl("TabStrip1")).TabSource = l;

            ((Button)SubCatWizard.FindControl("StepNavigationTemplateContainerID").FindControl("StepPreviousButton")).Visible     = false;
            ((Button)SubCatWizard.FindControl("FinishNavigationTemplateContainerID").FindControl("FinishPreviousButton")).Visible = false;

            this.SecVal();
        }