public void FillDDLSupplier()
    {
        try
        {
            using (BLL_PURC_Purchase objTechService = new BLL_PURC_Purchase())
            {
                BLL_Infra_VesselLib objVsl = new BLL_Infra_VesselLib();
                string ReqCode             = "";

                //if (!string.IsNullOrEmpty(Session["AttRequistionCode"].ToString()))
                //{
                //    ReqCode = Session["AttRequistionCode"].ToString();
                //}
                DataSet SupplDs = objTechService.GetSuupplierHavingAttachment(ReqCode);
                DDLSupplier.DataSource     = SupplDs.Tables[0];
                DDLSupplier.DataTextField  = "SHORT_NAME";
                DDLSupplier.DataValueField = "SUPPLIER";
                DDLSupplier.DataBind();

                DataTable CatDt = objTechService.GetCategory_FileType();
                DDLCategory.DataSource     = CatDt;
                DDLCategory.DataTextField  = "Description";
                DDLCategory.DataValueField = "code";
                DDLCategory.DataBind();
            }
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                using (SaleCarsEntities ctx = new SaleCarsEntities())
                {
                    DDlType.DataSource     = ctx.Types.ToList();
                    DDlType.DataValueField = "TypeID";
                    DDlType.DataTextField  = "TypeName";
                    DDlType.DataBind();


                    DDLCategory.DataSource     = ctx.Categories.ToList();
                    DDLCategory.DataValueField = "CatID";
                    DDLCategory.DataTextField  = "CatName";
                    DDLCategory.DataBind();
                }

                string keySearch = Request.QueryString["keySearch"];
                keySearch = Server.UrlDecode(keySearch);

                if (!string.IsNullOrEmpty(keySearch))
                {
                    SearchSimple(keySearch);
                }
            }
        }
Esempio n. 3
0
    protected void DefaultDropDownListRestore()
    {
        List <Item>          itemList       = mplc.GetActiveItemList();
        List <TenderListObj> tenderItemList = new List <TenderListObj>();

        foreach (Item i in itemList)
        {
            TenderListObj a = new TenderListObj(i);
            tenderItemList.Add(a);
        }
        DDLItem.DataSource = tenderItemList;
        DDLItem.DataBind();
        DDLItem.Items.Insert(0, new ListItem("Select", "NA"));

        List <string> catList = mplc.GetAllCategoryNames();

        DDLCategory.DataSource = catList;
        DDLCategory.DataBind();
        DDLCategory.Items.Insert(0, new ListItem("Select", "NA"));

        List <int> rank = new List <int>()
        {
            1, 2, 3
        };

        DDLPriorityRank.DataSource = rank;
        DDLPriorityRank.DataBind();

        TxtAddNewItem.Text = "";
        string Year = DateTime.Now.Year.ToString();

        TxtTenderYear.Text = Year;
    }
Esempio n. 4
0
        public void LoadDDL()
        {
            Brands_BAL     Bnds   = new Brands_BAL();
            Categories_BAL cate   = new Categories_BAL();
            DataSet        ds     = Bnds.GetAllBrand();
            DataSet        dsCate = cate.GetAllCategories();

            if (ds.Tables[0].Rows.Count > 0)
            {
                //Dispose the Dataset first.
                ds.Dispose();
                DDLBrand.Items.Clear();
                DDLBrand.DataSource     = ds;
                DDLBrand.DataTextField  = "BrandName";
                DDLBrand.DataValueField = "BrandID";
                DDLBrand.DataBind();
                DDLBrand.Items.Insert(0, new ListItem("-- Select any brand --", "0"));
            }
            if (dsCate.Tables[0].Rows.Count > 0)
            {
                //Dispose the Dataset first.
                ds.Dispose();
                DDLCategory.Items.Clear();
                DDLCategory.DataSource     = dsCate;
                DDLCategory.DataTextField  = "CategoryName";
                DDLCategory.DataValueField = "CategoryID";
                DDLCategory.DataBind();
                DDLCategory.Items.Insert(0, new ListItem("-- Select any category --", "0"));
            }
        }
Esempio n. 5
0
 private void fillddlcategory()
 {
     DDLCategory.DataSource     = ds.Tables["category"];
     DDLCategory.DataTextField  = "name";
     DDLCategory.DataValueField = "id";
     DDLCategory.DataBind();
 }
Esempio n. 6
0
 private void showSoftcategory()
 {
     LearnSite.BLL.Soft fbll = new LearnSite.BLL.Soft();
     DDLCategory.DataSource     = fbll.GetListCategory();
     DDLCategory.DataTextField  = "Ytitle";
     DDLCategory.DataValueField = "Yid";
     DDLCategory.DataBind();
 }
    DataTable dt = new DataTable(); //记录类别信息,绑定到Repeater,采用递归方式记录

    //加载
    public void LoadDataBind()
    {
        //创建列
        DataColumn column1 = new DataColumn("ID", typeof(string));
        DataColumn column2 = new DataColumn("CategoryName", typeof(string));
        DataColumn column3 = new DataColumn("ParentID", typeof(string));
        DataColumn column4 = new DataColumn("OrderBy", typeof(string));
        DataColumn column5 = new DataColumn("IsVouch", typeof(string));
        DataColumn column6 = new DataColumn("IsHidden", typeof(string));
        DataColumn column7 = new DataColumn("AddDate", typeof(string));

        //添加列
        dt.Columns.Add(column1);
        dt.Columns.Add(column2);
        dt.Columns.Add(column3);
        dt.Columns.Add(column4);
        dt.Columns.Add(column5);
        dt.Columns.Add(column6);
        dt.Columns.Add(column7);

        int cid = CommonClass.ReturnRequestInt("cid", 0);
        List <Expression> express = new List <Expression>()
        {
            new Expression("ParentID", "=", cid.ToStr()),
            new Expression("IsDelete", "=", "0")
        };
        List <TB_Product_Categorys> list = ProductService.CategoryService.Search(express, "OrderBy asc");

        foreach (TB_Product_Categorys model in list)
        {
            DataRow dr = dt.NewRow();
            dr["ID"]           = model.ID.ToStr();
            dr["CategoryName"] = model.CategoryName;
            dr["ParentID"]     = model.ParentID.ToStr();
            dr["OrderBy"]      = model.OrderBy.ToStr();
            dr["IsVouch"]      = model.VouchType.ToStr();
            dr["IsHidden"]     = model.IsHidden.ToStr();
            dr["AddDate"]      = model.AddDate.ToStr();
            //添加行
            dt.Rows.Add(dr);

            jiantou = "";//记录级别

            //获取子类
            GetChildClass(model.ID);
        }

        DDLCategory.DataSource     = dt;
        DDLCategory.DataTextField  = "CategoryName";
        DDLCategory.DataValueField = "ID";
        DDLCategory.DataBind();

        ListItem li = new ListItem();

        li.Text  = "==请选择==";
        li.Value = "0";
        DDLCategory.Items.Insert(0, li);
    }
Esempio n. 8
0
    protected void RBtnLCategory_SelectedIndexChanged(object sender, EventArgs e)
    {
        int    selectedIndex = RBtnLCategory.SelectedIndex;
        string type          = Request.QueryString["type"];

        if (type.Equals("RTR"))
        {
            switch (selectedIndex)
            {
            case 0:
                DDLCategory.Visible    = false;
                BtnCategoryAdd.Visible = false;
                GVCategory.Visible     = false;
                LblCatAlert.Visible    = false;
                ViewState["catSel"]    = 0;
                break;

            case 1:
                DDLCategory.Visible    = true;
                BtnCategoryAdd.Visible = true;
                GVCategory.Visible     = true;
                ViewState["catSel"]    = 1;
                GenerateRequisitionTrendController grtc = new GenerateRequisitionTrendController();
                List <string> CatNames = grtc.GetAllCategoryNames();
                DDLCategory.DataSource = CatNames;
                DDLCategory.DataBind();
                break;
            }
        }
        else
        {
            switch (selectedIndex)
            {
            case 0:
                DDLCategory.Visible    = false;
                BtnCategoryAdd.Visible = false;
                GVCategory.Visible     = false;
                LblCatAlert.Visible    = false;
                ViewState["catSel"]    = 0;
                break;

            case 1:
                DDLCategory.Visible    = true;
                BtnCategoryAdd.Visible = true;
                GVCategory.Visible     = true;
                ViewState["catSel"]    = 1;
                GenerateReorderTrendController grtc = new GenerateReorderTrendController();
                List <string> CatNames = grtc.GetAllCategoryNames();
                DDLCategory.DataSource = CatNames;
                DDLCategory.DataBind();
                break;
            }
        }
    }
        private void GetCategories()
        {
            Shopping  shopping = new Shopping();
            DataTable dt       = shopping.GetCategorie();

            if (dt.Rows.Count > 0)
            {
                DDLCategory.DataValueField = "CategoryID";
                DDLCategory.DataTextField  = "CategoryName";
                DDLCategory.DataSource     = dt;
                DDLCategory.DataBind();
            }
        }
Esempio n. 10
0
    public void LoadCategory()
    {
        DDLCategory.DataSource     = SystemService.AdverCategoryService.Search();
        DDLCategory.DataTextField  = "Name";
        DDLCategory.DataValueField = "ID";
        DDLCategory.DataBind();

        ListItem li = new ListItem();

        li.Text  = "==请选择==";
        li.Value = "";
        DDLCategory.Items.Insert(0, li);
    }
Esempio n. 11
0
    //加载
    public void LoadDataBind()
    {
        DDLCategory.DataSource     = InfoService.HelpCategoryService.Search();
        DDLCategory.DataTextField  = "Name";
        DDLCategory.DataValueField = "ID";
        DDLCategory.DataBind();

        int ID = CommonClass.ReturnRequestInt("id", 0);

        if (ID > 0)
        {
            TB_Info_Help model = InfoService.HelpService.Get(ID);
            TbName.Text = model.Title;
            CheckBoxIsHidden.Checked = model.IsHIdden;
            FckRemark.Value          = model.Remark;

            ViewState["id"] = model.ID;
        }
    }
        protected void DDLReligion_SelectedIndexChanged(object sender, EventArgs e)
        {
            List <string> ls = new List <string>();

            ls.Clear();
            ls.Add("--Select--");
            switch (DDLReligion.Text)
            {
            case "Hindu":
                ls.Add("SC");
                ls.Add("ST");
                ls.Add("OBC");
                ls.Add("General");
                break;

            case "Muslim":
                ls.Add("Muslim");
                break;

            case "Christian":
                ls.Add("Roman");
                ls.Add("Catholic");
                ls.Add("Pentecostal");
                break;

            case "Sikh":
                ls.Add("Sikh");
                break;

            case "Anglo Indian":
                ls.Add("Foreign Indian");
                break;


            case "Pegan":
                ls.Add("Pegan");
                break;
            }
            DDLCategory.DataSource = ls;
            DDLCategory.DataBind();
        }
Esempio n. 13
0
        public void DDLLoading()
        {
            DataSet ds = BalObj.GetFeedBackDDL();

            if (ds.Tables[0].Rows.Count > 0)
            {
                //Dispose the Dataset first.
                ds.Dispose();
                DDLBrands.Items.Clear();
                DDLBrands.DataSource     = ds.Tables[0];
                DDLBrands.DataTextField  = "BrandName";
                DDLBrands.DataValueField = "BrandID";
                DDLBrands.DataBind();
                DDLBrands.Items.Insert(0, new ListItem("-- Select any brand --", "0"));
            }

            if (ds.Tables[1].Rows.Count > 0)
            {
                //Dispose the Dataset first.
                ds.Dispose();
                DDLCategory.Items.Clear();
                DDLCategory.DataSource     = ds.Tables[1];
                DDLCategory.DataTextField  = "CategoryName";
                DDLCategory.DataValueField = "CategoryID";
                DDLCategory.DataBind();
                DDLCategory.Items.Insert(0, new ListItem("-- Select any category --", "0"));
            }

            if (ds.Tables[2].Rows.Count > 0)
            {
                //Dispose the Dataset first.
                ds.Dispose();
                DDLItems.Items.Clear();
                DDLItems.DataSource     = ds.Tables[2];
                DDLItems.DataTextField  = "ItemName";
                DDLItems.DataValueField = "ItemID";
                DDLItems.DataBind();
                DDLItems.Items.Insert(0, new ListItem("-- Select any item --", "0"));
            }
        }
Esempio n. 14
0
    // // //// Item category list
    public void CategoryDDLDataBind()
    {
        try
        {
            SqlConnection cn  = new SqlConnection(ConnectionString);
            SqlCommand    cmd = new SqlCommand("SP_POS_DataBind_CategoryDDL", cn);
            cmd.CommandType = CommandType.StoredProcedure;
            cn.Open();

            SqlDataAdapter adpt = new SqlDataAdapter(cmd);
            DataTable      dt   = new DataTable();
            adpt.Fill(dt);

            DDLCategory.DataSource     = dt;
            DDLCategory.DataTextField  = "ItemCategory";
            DDLCategory.DataValueField = "ItemCategory";
            DDLCategory.DataBind();
        }
        catch
        {
            lbtotalRow.Text = "No Records Found";
        }
    }
 public void BindCustomerCategory()
 {
     DDLCategory.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM");
     DDLCategory.DataBind();
     DDLCategory.Items.Insert(0, new ListItem("-- Select Category --", "0"));
 }