Ejemplo n.º 1
0
        private void ShowInfo(int Product_ID)
        {
            ZhangWei.BLL.Product   bll   = new ZhangWei.BLL.Product();
            ZhangWei.Model.Product model = bll.GetModel(Product_ID);
            this.lblProduct_ID.Text = model.Product_ID.ToString();
            //this.txtProductList_ID.Text = model.ProductList_ID.ToString();
            DropDownList1.SelectedValue = model.ProductList_ID.ToString();
            this.txtName.Text           = model.Name;
            //this.txtProductSpec_ID.Text = model.ProductSpec_ID.ToString();
            DropDownList2.SelectedValue = model.ProductSpec_ID.ToString();
            //this.txtProductUnit_ID.Text = model.ProductUnit_ID.ToString();
            DropDownList3.SelectedValue = model.ProductUnit_ID.ToString();
            this.txtPrice.Text          = model.Price.ToString();
            this.Offering_Price.Text    = model.Offering_Price.ToString();
            //this.txtEmployee_ID.Text = model.Employee_ID.ToString();
            DropDownList4.SelectedValue = model.Employee_ID.ToString();
            DataSet ds = new BLL.ProductList().GetList(1, "ProductList_ID = " + model.ProductList_ID, "ProductList_ID");

            DropDownList5.SelectedValue = ds.Tables[0].Rows[0]["ProductClass_ID"].ToString();
            //this.txtCreateDate.Text = model.CreateDate.ToString();
            this.Label1.Text    = model.CreateDate.ToString();
            this.txtRemark.Text = model.Remark;
            this.s_spell.Text   = model.s_spell;
            this.spell.Text     = model.spell;
            this.TextBox1.Text  = model.shortname;
            ZhangWei.Model.Product_Supplier ml_ps = new BLL.Product_Supplier().GetModel(Product_ID);
            this.DropDownList6.SelectedValue = ml_ps.Supplier_ID.ToString();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据主分类对细分类的下拉列表进行二级联动
        /// </summary>
        protected void BindSelect()
        {
            DataSet ds = new BLL.ProductList().GetList("ProductClass_ID = " + DropDownList5.SelectedValue);

            DropDownList1.Items.Clear();
            DropDownList1.DataSource     = ds;
            DropDownList1.DataTextField  = "Name";
            DropDownList1.DataValueField = "ProductList_ID";
            DropDownList1.DataBind();
        }