コード例 #1
0
    private void LoadProvince()
    {
        OtherFunctions     obj     = new OtherFunctions();
        DataSet            ds      = obj.GetAllProvince("Province", Globals.AgentCatID, 1);
        DropDownListHelper ddlHelp = new DropDownListHelper();

        ddlHelp.FillData(ddlProvince, ds, "ProvinceName", "ProvinceID", "Vui lòng chọn...");
        ddlHelp.FillData(ddlProvince2, ds, "ProvinceName", "ProvinceID");
    }
コード例 #2
0
    private void LoadSupportGroup()
    {
        OtherFunctions     obj    = new OtherFunctions();
        DataSet            ds     = obj.GetAllSupportGroup("SupportGroup", Globals.AgentCatID, ddlLanguage.SelectedValue);
        DropDownListHelper dlHelp = new DropDownListHelper();

        dlHelp.FillData(ddlSupportGroup, ds, "SupportGroupName" + ddlLanguage.SelectedValue, "SupportGroupID", "--- Chọn nhóm ---");
    }
コード例 #3
0
    private void LoadGroup()
    {
        MyTool.WebDemo     gr        = new MyTool.WebDemo();
        int                RootID    = gr.GetRootID(Globals.AgentCatID);
        DataSet            ds        = gr.GetWebDemoGroupByParentID("WebDemoGroup", Globals.AgentCatID, RootID);
        DropDownListHelper ddlHelper = new DropDownListHelper();

        ddlHelper.FillData(ddlGroup, ds, "Name", "ID", "---Xem tất cả---");
    }
コード例 #4
0
    private void LoadWebDemoGroup()
    {
        WebDemo            obj     = new WebDemo();
        int                RootID  = obj.GetRootID(Globals.AgentCatID);
        DataSet            ds      = obj.GetWebDemoGroupByParentID("WebDemoGroup", Globals.AgentCatID, RootID);
        DropDownListHelper ddlHelp = new DropDownListHelper();

        ddlHelp.FillData(ddlCategory, ds, "Name", "ID", "---Chọn chuyên mục WebDemo---");
    }
コード例 #5
0
    private void LoadAlbum()
    {
        Gallery obj = new Gallery();
        DataSet ds  = obj.GetAllAlbum("GalleryAlbum", Globals.AgentCatID);

        if (ds.Tables[0].Rows.Count > 0)
        {
            DropDownListHelper ddlHelp = new DropDownListHelper();
            ddlHelp.FillData(ddlAlbum, ds, "AlbumName", "ID", "---Vui lòng chọn Album---");
        }
    }
コード例 #6
0
 private void LoadAgentCat()
 {
     try
     {
         string             Lang      = "VI";
         AgentCat           obj       = new AgentCat();
         DataSet            ds        = obj.GetAllAgentCat("AgentCat");
         DropDownListHelper ddlHelper = new DropDownListHelper();
         ddlHelper.FillData(ddlAgentCat, ds, "AgentNameVI", "ID", "---Chọn công ty---");
     }
     catch { }
 }
コード例 #7
0
    protected void ddlCatalog_SelectedIndexChanged(object sender, EventArgs e)
    {
        int                CatID    = Convert.ToInt32(ddlCatalog.SelectedValue);
        Product            obj      = new Product();
        DataSet            ds       = obj.GetProductByCatalogID("ProductCat", ddlLanguage.SelectedValue, CatID);
        DropDownListHelper dlHelper = new DropDownListHelper();

        dlHelper.FillData(ddlProduct, ds, "TenGoi", "ID");
        if (ddlLanguage.SelectedValue == "VI")
        {
            ddlProduct.Items.Insert(0, new ListItem("--- Vui lòng chọn ---", "-1"));
        }
        else if (ddlLanguage.SelectedValue == "EN")
        {
            ddlProduct.Items.Insert(0, new ListItem("--- Please Choose ---", "-1"));
        }
        ddlProduct.Attributes.Add("style", "color:Blue;font-size:14px;");
    }
コード例 #8
0
    private void LoadProductListByCatID(string Lang, int CatID)
    {
        try
        {
            Product            obj      = new Product();
            DataSet            ds       = obj.GetProductByCatalogID("ProductCat", Lang, CatID);
            DropDownListHelper dlHelper = new DropDownListHelper();

            dlHelper.FillData(ddlProduct, ds, "TenGoi", "ID");
            if (ddlLanguage.SelectedValue == "VI")
            {
                ddlProduct.Items.Insert(0, new ListItem("--- Vui lòng chọn ---", "-1"));
            }
            else if (ddlLanguage.SelectedValue == "EN")
            {
                ddlProduct.Items.Insert(0, new ListItem("--- Please Choose ---", "-1"));
            }
            ddlProduct.Attributes.Add("style", "color:Blue;font-size:14px;");
        }
        catch { }
    }