Exemplo n.º 1
0
        private void LoadData()
        {
            List <CTPetCategory> list = new List <CTPetCategory>();

            PetCategory petcategory = new PetCategory();

            list = petcategory.GetPetCategoryList();
            GridView1.DataSource   = list;
            GridView1.DataKeyNames = new string[] { "petCategoryID" };
            GridView1.DataBind();
        }
Exemplo n.º 2
0
        private void LoadPetCategory()
        {
            List <CTPetCategory> petcategoryList = new List <CTPetCategory>();
            PetCategory          petcategory     = new PetCategory();

            petcategoryList           = petcategory.GetPetCategoryList();
            dpCategory.DataSource     = petcategoryList;
            dpCategory.DataTextField  = "petCategoryName";
            dpCategory.DataValueField = "petCategoryID";
            dpCategory.DataBind();
            ddlPetCategory.DataSource     = petcategoryList;
            ddlPetCategory.DataTextField  = "petCategoryName";
            ddlPetCategory.DataValueField = "petCategoryID";
            ddlPetCategory.DataBind();
            ddlPetCategory.Items.Insert(0, new ListItem("", ""));
        }