private void BindDetailData()
 {
     string filter = ViewState["DetailFilter"].ToString();
     OrderDal orderDal = new OrderDal();
     pagerDetail.PageSize = PagingSize;
     pagerDetail.RecordCount = orderDal.GetDetailCount(filter);
     DataTable table = orderDal.GetDetailAll(detailPageIndex, PagingSize, filter);
     BindTable2GridView(gvDetail, table);
 }
    private void BindData()
    {
        pager.PageSize = PagingSize;

        OrderDal orderDal = new OrderDal();
        string filter = null;
        if (ViewState["Filter"] != null)
            filter = ViewState["Filter"].ToString();
        pager.RecordCount = orderDal.GetMasterCount(filter);
        DataTable table = orderDal.GetMasterAll(pageIndex, PagingSize, filter);
        BindTable2GridView(gvMain, table);
    }
Exemplo n.º 3
0
    /// <summary>
    /// 用户选择需分拣的线路后进行数据优化
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnContinue_Click(object sender, EventArgs e)
    {
        string selectedRoutes = "";
        foreach (GridViewRow row in gvRoute.Rows)
        {
            if (row.Cells[0].Controls.Count != 0 && ((CheckBox)row.Cells[0].Controls[0]).Checked)
            {
                selectedRoutes += string.Format("'{0}',", row.Cells[1].Text);
            }
        }

        if (selectedRoutes.Trim().Length != 0)
        {
            selectedRoutes = selectedRoutes.Substring(0, selectedRoutes.Length - 1);

            //清除用户选择之外的数据
            OrderDal orderDal = new OrderDal();
            orderDal.DeleteNoUseOrder(Session["OrderDate"].ToString(), Convert.ToInt32(Session["BatchNo"]), selectedRoutes);

            Session["OptimizeStatus"] = "<root><status>CONTINUE</status><message></message></root>";
            JScript.Instance.RegisterScript(Page, "post=true;");
            thread = new Thread(new ThreadStart(Optimize));
            thread.Start();
            pnlMain.Visible = true;
            pnlRoute.Visible = false;
        }
        else
            JScript.Instance.ShowMessage(Page, "请选择要进行优化的线路。");
        
    }
Exemplo n.º 4
0
 /// <summary>
 /// 绑定分拣线路数据
 /// </summary>
 private void BindData()
 {
     OrderDal orderDal = new OrderDal();
     DataTable table = orderDal.GetOrderRoute(Session["OrderDate"].ToString(), Convert.ToInt32(Session["BatchNo"]));
     BindTable2GridView(gvRoute, table);
 }