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)); } } }
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; } }
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); }
protected void ddlValueSelectedIndexChanged(object sender, EventArgs e) { if (String.Compare(this.ddlCat.SelectedItem.Text, "Subcategory", true) == 0) { this.BindData(PE_DAL.GetAllCatalogSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), DEFAULT_SORTBY, true, true)); } else if (String.Compare(this.ddlCat.SelectedItem.Text, "Subsubcategory", true) == 0) { this.BindData(PE_DAL.GetAllCatalogSubSubCategorySeq(System.Convert.ToInt32(this.ddlValue.SelectedValue), DEFAULT_SORTBY, true, true)); } }