Esempio n. 1
0
        protected void BindStockList(int Pm_id, int WareHouseId)
        {
            int       count = 0;
            SqlHelper conn  = LocalSqlHelper.WH;
            string    sql   = "select stock_id,pro_txm,pro_name,pro_spec,pro_model, shelf_no from View_Product with(nolock) where warehouse_id=" + WareHouseId + " and pm_id=" + Pm_id + " order by pro_model";
            //Response.Write(sql);
            DataTable dt = conn.ExecDataTable(sql);

            StockList.DataShow(dt);
        }
Esempio n. 2
0
        protected void BindStockList(int sm_id, int WareHouse_id)
        {
            int       count = 0;
            SqlHelper conn  = LocalSqlHelper.WH;
            string    sql   = "select *,shelf_no='',stock_id=0 from Tb_storage_product with(nolock) where  sm_id=" + sm_id + " order by p_name,p_spec";
            //Response.Write(sql);
            DataTable dt = conn.ExecDataTable(sql);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i]["shelf_no"] = StorageHelper.getShelfNo(Convert.ToInt32(dt.Rows[i]["pro_id"]), WareHouse_id);
                dt.Rows[i]["stock_id"] = StorageHelper.getStockId(Convert.ToInt32(dt.Rows[i]["pro_id"]), WareHouse_id);
            }
            StockList.DataShow(dt);
        }