示例#1
0
        private void BindData()
        {
            Session.Remove("Query");
            Session.Remove("ToReceive");
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            StoBusi = new BusiComm.StorageBusi(strcons);
            try
            {
                DataTable dtout = StoBusi.GetMakeBillNoRelative();
                if (dtout == null)
                {
                    this.SetErrorMsgPageBydir("查询出错,请重试!");
                    return;
                }
                else
                {
                    Session["ToReceive"] = dtout.Copy();
                    this.TableConvert(dtout, "cnvcProduceDeptID", "NewDept");
                    this.TableConvert(dtout, "cnvcGroup", "tbNameCodeToStorage", "vcCommSign='GROUP'");
                    dtout.TableName = "制令领料单";
                    if (dtout.Rows.Count > 0)
                    {
                        this.btnRelativeMakeToReceive.Enabled = true;
                    }
                }

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