//显示打印页面中的所有数据
        protected void DataView()
        {
            InvoiceDC invoiceDC = new InvoiceDC();

            try
            {
                //绑定其他数据
                DataSet dataset_header = new DataSet();
                dataset_header    = invoiceDC.getExchangeHeaderBySome(select_text.Value, "");
                flex_value.Value  = dataset_header.Tables[0].Rows[0]["flex_value"].ToString();
                description.Value = dataset_header.Tables[0].Rows[0]["description"].ToString();
                create_time.Value = dataset_header.Tables[0].Rows[0]["create_time"].ToString();
                create_man.Value  = dataset_header.Tables[0].Rows[0]["create_man"].ToString();



                //绑定Repeater中数据
                DataSet dataset_line = new DataSet();
                dataset_line = invoiceDC.getExchangeLineBySome(select_text.Value, "", Convert.ToDateTime("2016-07-01 00:00:00"), DateTime.Now);

                printTransFerringOrderRepeater.DataSource = dataset_line;
                printTransFerringOrderRepeater.DataBind();
            }
            catch (Exception e)
            {
                PageUtil.showToast(this, "数据库中没有对应数据,请重新输入领料单号");
            }
        }
Ejemplo n.º 2
0
        //查询单头单身
        protected void search(object sender, EventArgs e)
        {
            try
            {
                string Invoice_no = DropDownList_invoice_no.SelectedValue.ToString();

                string first_time = "2016-07-01 00:00:00";
                DateTime start_time = Convert.ToDateTime(first_time);
                DateTime end_time = DateTime.Now;

                if (Invoice_no == "--选择调拨单号--")
                    Invoice_no = "";

                ExchangeHeaderReater.DataSource = invoiceDC.getExchangeHeaderBySome(Invoice_no,"");
                ExchangeLineReater.DataSource = invoiceDC.getExchangeLineBySome(Invoice_no, "", start_time, end_time);

                if (ExchangeHeaderReater.DataSource == null)
                {
                    PageUtil.showToast(this, "无相关调拨单头信息");

                }
                ExchangeHeaderReater.DataBind();

                if (ExchangeLineReater.DataSource == null)
                {
                    PageUtil.showToast(this, "无相关调拨单身信息");
                }
                ExchangeLineReater.DataBind();
            }
            catch (Exception e1)
            {
                PageUtil.showToast(this, "查询失败");
            }
        }
Ejemplo n.º 3
0
        protected void Select(object sender, EventArgs e)
        {
            try
            {
                //string Invoice_no = DropDownList_invoice_no.SelectedValue.ToString();
                //string Item_name = DropDownList_item_name.SelectedValue.ToString();

                string Invoice_no = invoice_no.Value;
                string Item_name  = item_name.Value;


                //if (Invoice_no == "--选择调拨单号--")
                //    Invoice_no = "";
                //if (Item_name == "--选择料号--")
                //    Item_name = "";

                string FIRST_TIME = inpend.Value;
                if (FIRST_TIME == "")
                {
                    FIRST_TIME = "2016-07-01 00:00:00";
                }

                start_time = Convert.ToDateTime(FIRST_TIME);
                string LAST_TIME = inpstart.Value;
                end_time = Convert.ToDateTime(LAST_TIME);

                GridView_header.DataSource = invoiceDC.getExchangeHeaderBySome(Invoice_no, "");
                GridView_line.DataSource   = invoiceDC.getExchangeLineBySome(Invoice_no, Item_name, start_time, end_time);

                if (GridView_header.DataSource == null)
                {
                    PageUtil.showToast(this, "无相关调拨单头信息");
                }
                GridView_header.DataBind();

                if (GridView_line.DataSource == null)
                {
                    PageUtil.showToast(this, "无相关调拨单身信息");
                }
                GridView_line.DataBind();
            }
            catch (Exception e1)
            {
                PageUtil.showToast(this, "查询失败");
            }
        }