コード例 #1
0
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            paras             = new ParametersB();
            paras.WarehouseNo = txtWarehouseNo.Text.Trim();
            paras.InStockF    = txtInStockF.Text.Trim();
            paras.InStockT    = txtInStockT.Text.Trim();
            //paras.MachingState = txtMachingState.Text.Trim();
            paras.Maching   = ddlMaching.SelectedValue;
            paras.Brand     = ddlBrand.SelectedValue;
            paras.Model     = ddlModel.SelectedValue;
            paras.Parameter = ddlParameter.SelectedValue;
            paras.Supplier  = ddlSupplier.SelectedValue;

            DataSet ds        = DAL.AddStocksDAL.GetAddStocks(paras.WarehouseNo, paras.Maching, paras.Brand, paras.Model, paras.Parameter, paras.Supplier, paras.InStockF, paras.InStockT);
            int     rowsCount = ds.Tables[0].Rows.Count;

            if (rowsCount > pageSize)
            {
                totalPage = (int)Math.Ceiling((double)rowsCount / (double)pageSize);
            }
            else
            {
                totalPage = 1;
            }

            GVDataBind(1);
        }
コード例 #2
0
ファイル: AddStockQuery.aspx.cs プロジェクト: Ni9e/LuxERP
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            paras = new ParametersB();
            paras.WarehouseNo = txtWarehouseNo.Text.Trim();
            paras.InStockF = txtInStockF.Text.Trim();
            paras.InStockT = txtInStockT.Text.Trim();
            //paras.MachingState = txtMachingState.Text.Trim();
            paras.Maching = ddlMaching.SelectedValue;
            paras.Brand = ddlBrand.SelectedValue;
            paras.Model = ddlModel.SelectedValue;
            paras.Parameter = ddlParameter.SelectedValue;
            paras.Supplier = ddlSupplier.SelectedValue;

            DataSet ds = DAL.AddStocksDAL.GetAddStocks(paras.WarehouseNo, paras.Maching, paras.Brand, paras.Model, paras.Parameter, paras.Supplier, paras.InStockF, paras.InStockT);
            int rowsCount = ds.Tables[0].Rows.Count;
            if (rowsCount > pageSize)
            {
                totalPage = (int)Math.Ceiling((double)rowsCount / (double)pageSize);
            }
            else
            {
                totalPage = 1;
            }

            GVDataBind(1);
        }