Example #1
0
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            paras                    = new ScrapStocksParameters();
            paras.WarehouseNo        = txtWarehouseNo.Text.Trim();
            paras.AddScrapStockDateA = txtAddScrapStockDateA.Text.Trim();
            paras.AddScrapStockDateB = txtAddScrapStockDateB.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.ScrapStocksDAL.GetScrapStocksTotal(paras.WarehouseNo, paras.Maching, paras.Brand, paras.Model, paras.Parameter, paras.Supplier, paras.AddScrapStockDateA, paras.AddScrapStockDateB);
            int     rowsCount = ds.Tables[0].Rows.Count;

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

            GVDataBind(1);
        }
Example #2
0
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            paras = new ScrapStocksParameters();
            paras.WarehouseNo = txtWarehouseNo.Text.Trim();
            paras.AddScrapStockDateA = txtAddScrapStockDateA.Text.Trim();
            paras.AddScrapStockDateB = txtAddScrapStockDateB.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.ScrapStocksDAL.GetScrapStocksTotal(paras.WarehouseNo, paras.Maching, paras.Brand, paras.Model, paras.Parameter, paras.Supplier, paras.AddScrapStockDateA, paras.AddScrapStockDateB);
            int rowsCount = ds.Tables[0].Rows.Count;
            if (rowsCount > pageSize)
            {
                totalPage = (int)Math.Ceiling((double)rowsCount / (double)pageSize);
            }
            else
            {
                totalPage = 1;
            }

            GVDataBind(1);
        }