Exemple #1
0
        protected void ddlCatSelectedIndexChanged(object sender, EventArgs e)
        {
            this.SortExpression = DEFAULT_SORTBY;
            this.SortAscending  = true;

            if (this.ddlCat.SelectedIndex != 0)
            {
                this.ddlValue.Visible = true;

                if (String.Compare(this.ddlCat.SelectedItem.Text, "Subcategory", true) == 0)
                {
                    this.BindDDLValues_Sub(PE_DAL.GetAllCatalogSubjectHvSubcat(true));
                    this.ddlValue.SelectedIndex = 0;
                    this.BindData(PE_DAL.GetAllCatalogSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), this.SortExpression, this.SortAscending, true));
                }
                else if (String.Compare(this.ddlCat.SelectedItem.Text, "Subsubcategory", true) == 0)
                {
                    this.BindDDLValues_Subsub(PE_DAL.GetAllCatalogSubcatHvSubSubcat(true));
                    this.ddlValue.SelectedIndex = 0;
                    this.BindData(PE_DAL.GetAllCatalogSubSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), this.SortExpression, this.SortAscending, true));
                }
            }
            else
            {
                this.ddlValue.Visible = false;

                if (String.Compare(this.ddlCat.SelectedItem.Text, "Category", true) == 0)
                {
                    this.BindData(PE_DAL.GetAllCatalogSubjectSeq(this.SortExpression, this.SortAscending, true));
                }
            }
        }
Exemple #2
0
        protected void gvResult_SortCommand(object source, DataGridSortCommandEventArgs e)
        {
            if ((e.SortExpression == this.SortExpression))
            {
                SortAscending = !SortAscending;
            }
            else
            {
                SortAscending = true;
            }
            // Set the SortExpression property to the SortExpression passed in
            this.SortExpression = e.SortExpression;

            List <Seq> a = null;

            switch (this.ddlCat.SelectedValue)
            {
            case "Category":
                a = PE_DAL.GetAllCatalogSubjectSeq(this.SortExpression, this.SortAscending, true);
                break;

            case "Subcategory":
                a = PE_DAL.GetAllCatalogSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), this.SortExpression, this.SortAscending, true);
                break;

            case "Subsubcategory":
                a = PE_DAL.GetAllCatalogSubSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), this.SortExpression, this.SortAscending, true);
                break;
            }
            this.BindData(a);
        }
Exemple #3
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            switch (this.ddlCat.SelectedValue)
            {
            case "Category":
                if (this.CatSave())
                {
                    this.BindData(PE_DAL.GetAllCatalogSubjectSeq(DEFAULT_SORTBY, true, true));
                }
                break;

            case "Subcategory":
                if (this.SubCatSave())
                {
                    this.BindData(PE_DAL.GetAllCatalogSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), DEFAULT_SORTBY, true, true));
                }
                break;

            case "Subsubcategory":
                if (this.SubSubCatSave())
                {
                    this.BindData(PE_DAL.GetAllCatalogSubSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), DEFAULT_SORTBY, true, true));
                }
                break;
            }
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ViewState["SortAscending"] = SortDirection.Ascending;
                this.SortExpression        = DEFAULT_SORTBY;
                this.ddlValue.Visible      = false;
                this.BindData(PE_DAL.GetAllCatalogSubjectSeq(this.SortExpression, true, true));

                if (System.Convert.ToBoolean(Session[PubEntAdminManager.JS]))
                {
                    this.btnUpdateCatSelection.Visible = this.btnUpdateValueSection.Visible = false;
                }
                else
                {
                    this.btnUpdateCatSelection.Visible = true;
                    this.btnUpdateValueSection.Visible = false;
                }
            }
            this.SecVal();
        }