Esempio n. 1
0
 private void BindClaimSkuSubCategory()
 {
     DropDownListSubCategory.ClearSelection();
     DropDownListSubCategory.DataSource     = ClaimSku.GetClaimSkuSubCategoryListByClaimSkuCategory(Convert.ToInt32(DropDownListCategory.SelectedValue));
     DropDownListSubCategory.DataTextField  = "Description";
     DropDownListSubCategory.DataValueField = "ClaimSkuSubCategoryId";
     DropDownListSubCategory.DataBind();
 }
 private void BindClaimSkuSubCategory()
 {
     DropDownListSubCategory.DataSource     = ClaimSku.GetClaimSkuSubCategoryListByClaimSkuCategory(Convert.ToInt32(DropDownListCategory.SelectedValue));
     DropDownListSubCategory.DataTextField  = "Description";
     DropDownListSubCategory.DataValueField = "ClaimSkuSubCategoryId";
     DropDownListSubCategory.DataBind();
     //DropDownListSubCategory.Items.Insert(0, new ListItem("Please select", "0"));
 }
Esempio n. 3
0
        protected void DropDownListCategory_SelectedIndexChanged(object sender, EventArgs e)
        {
            AltKategori a = new AltKategori();

            a.KategoriId.Id = Convert.ToInt16(DropDownListCategory.SelectedItem.Value);
            AltKategoriDb db = new AltKategoriDb();

            DropDownListSubCategory.DataSource     = db.GetSubCategory(a);
            DropDownListSubCategory.DataTextField  = "AltKategori_Ad";
            DropDownListSubCategory.DataValueField = "AltKategori_ID";
            DropDownListSubCategory.DataBind();
        }
        protected void DropDownListCategory_SelectedIndexChanged(object sender, EventArgs e)
        {
            string        constr = ConfigurationManager.ConnectionStrings["Registration"].ConnectionString;
            SqlConnection connec = new SqlConnection(constr);
            string        S      = "spGetSubCat";
            SqlCommand    com    = new SqlCommand(S, connec);

            com.Parameters.AddWithValue("@id", int.Parse(DropDownListCategory.SelectedItem.Value));
            connec.Open();
            com.CommandType = CommandType.StoredProcedure;
            DropDownListSubCategory.DataSource     = com.ExecuteReader();
            DropDownListSubCategory.DataValueField = "subcat id";
            DropDownListSubCategory.DataTextField  = "sub cat name";
            DropDownListSubCategory.DataBind();
            connec.Close();
        }