예제 #1
0
        protected void btnQuery_Click(object sender, System.EventArgs e)
        {
            Session.Remove("Query");

            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            StoBusi = new BusiComm.StorageBusi(strcons);
            try
            {
                DataTable dtout = StoBusi.GetBillOfReceiveNoSend();
                if (dtout == null)
                {
                    this.SetErrorMsgPageBydir("查询出错,请重试!");
                    return;
                }
                else
                {
                    this.TableConvert(dtout, "cnvcReceiveDeptID", "NewDept");
                    this.TableConvert(dtout, "cnvcGroup", "tbNameCodeToStorage", "vcCommSign='GROUP'");
                    this.TableConvert(dtout, "cnvcBillState", "tbNameCodeToStorage", "vcCommSign='RECEIVE_OS'");
                    dtout.TableName = "领料单";
                }

                Session["Query"]          = dtout;
                this.DataGrid1.DataSource = dtout;
                this.DataGrid1.DataBind();

                this.DataGrid2.DataSource = (DataTable)Session["SendReceiveID"];
                this.DataGrid2.DataBind();

                this.DataGrid3.DataSource = (DataTable)Session["SendReceiveDetail"];
                this.DataGrid3.DataBind();
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }