Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["Local"] = "PO退回";
            if (Session["LoginId"] == null)
            {
                PageUtil.showToast(this, "未获取到你的登陆状态,请退出系统重新登录!");
                return;
            }

            if (!IsPostBack)
            {
                SubinventoryDC subDC = new SubinventoryDC();
                DataSet        ds1   = subDC.getAllUsedSubinventory_name();
                if (ds1 != null)
                {
                    DropDownList1.DataSource     = ds1.Tables[0].DefaultView;
                    DropDownList1.DataValueField = "subinventory_name";
                    DropDownList1.DataBind();
                }
                //else
                //    PageUtil.showAlert(this, "库别载入出错!");
                DropDownList1.Items.Insert(0, "--选择库别--");
                DropDownList2.Items.Insert(0, "--选择区域--");
            }
        }
Пример #2
0
        private void BindDrop()          //查询时的数据绑定
        {
            SubinventoryDC subDC = new SubinventoryDC();
            DataSet        ds1   = subDC.getAllUsedSubinventory_name();

            Subinventory1.DataValueField = "subinventory_name";
            Subinventory1.DataSource     = ds1.Tables[0].DefaultView;
            Subinventory1.DataBind();
            Subinventory1.Items.Insert(0, "选择库别");
        }
Пример #3
0
        private void BindDrop()
        {
            SubinventoryDC subDC = new SubinventoryDC();
            DataSet        ds1   = subDC.getAllUsedSubinventory_name();

            DropDownList1.DataTextField  = "subinventory_name";
            DropDownList1.DataValueField = "subinventory_key";
            DropDownList1.DataSource     = ds1.Tables[0].DefaultView;
            DropDownList1.DataBind();
            DropDownList1.Items.Insert(0, new ListItem("--选择库别--"));
            DropDownList2.Items.Insert(0, new ListItem("--选择区域--"));
        }
Пример #4
0
        private void BindDrop1()  //更新的数据绑定
        {
            SubinventoryDC subDC = new SubinventoryDC();
            DataSet        ds1   = subDC.getAllUsedSubinventory_name();

            if (ds1 != null)
            {
                DropDownList3.DataValueField = "subinventory_name";
                DropDownList3.DataSource     = ds1.Tables[0].DefaultView;
                DropDownList3.DataBind();
            }
            else
            {
                PageUtil.showToast(this.Page, "数据载入出错!");
            }
            DropDownList3.Items.Insert(0, "选择库别");
        }
Пример #5
0
        public void ProcessRequest(HttpContext context)
        {
            SubinventoryDC subDC = new SubinventoryDC();
            DataSet        ds    = subDC.getAllUsedSubinventory_name();

            List <string> modellist = new List <string>();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    modellist.Add(dr["subinventory_name"].ToString());
                }
            }
            string json = toJson(modellist);

            context.Response.ContentType = "text/plain";
            context.Response.Write(json);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["Local"] = "调拨单";
     if (!IsPostBack)
     {
         List <string> list = new List <string>();
         list = pnDc.getAllItem_name();
         DataSet operation_Route_List = wip_operationDC.getAllRoute();
         DataSet subinventory_List    = subDC.getAllUsedSubinventory_name();
         DataSet frame_List           = frameDC.getAllFrame_name();
         if (subinventory_List != null || frame_List != null)
         {
             item_name_List.DataSource = list;
             item_name_List.DataBind();
             operation_seq_num.DataSource     = operation_Route_List.Tables[0].DefaultView;
             operation_seq_num.DataValueField = "route";
             operation_seq_num.DataBind();
             out_subinventory_name.DataSource     = subinventory_List.Tables[0].DefaultView;
             out_subinventory_name.DataValueField = "subinventory_name";
             out_subinventory_name.DataBind();
             in_subinventory_name.DataSource     = subinventory_List.Tables[0].DefaultView;
             in_subinventory_name.DataValueField = "subinventory_name";
             in_subinventory_name.DataBind();
             out_locator_name.DataSource     = frame_List;
             out_locator_name.DataValueField = "frame_name";
             out_locator_name.DataBind();
             in_locator_name.DataSource     = frame_List;
             in_locator_name.DataValueField = "frame_name";
             in_locator_name.DataBind();
         }
         else
         {
             PageUtil.showAlert(this, "数据载入出错!");
         }
         out_subinventory_name.Items.Insert(0, "选择库别");
         in_subinventory_name.Items.Insert(0, "选择库别");
         out_locator_name.Items.Insert(0, "选择料架");
         in_locator_name.Items.Insert(0, "选择料架");
         operation_seq_num.Items.Insert(0, "选择制程");
         item_name_List.Items.Insert(0, "选择料号");
     }
 }
Пример #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["Local"] = "退料单";
            if (!IsPostBack)
            {
                BindDrop();
                SubinventoryDC  subDC = new SubinventoryDC();
                DataSet         ds1   = subDC.getAllUsedSubinventory_name();
                Wip_operationDC regDC = new Wip_operationDC();
                DataSet         ds2   = regDC.getRegion_nameBySubinventory_name();
                if (ds1 != null)
                {
                    Subinventory4.DataSource     = ds1.Tables[0].DefaultView;
                    Subinventory1.DataSource     = ds1.Tables[0].DefaultView;
                    Subinventory4.DataValueField = "subinventory_key";
                    Subinventory4.DataTextField  = "subinventory_name";
                    Subinventory1.DataValueField = "subinventory_key";
                    Subinventory1.DataTextField  = "subinventory_name";
                    Subinventory4.DataBind();
                    Subinventory1.DataBind();
                }
                else
                {
                    PageUtil.showToast(this.Page, "数据载入出错!");
                }
                Subinventory1.Items.Insert(0, "选择库别");
                if (ds2 != null)
                {
                    seq_operation_num1.DataSource = ds2.Tables[0].DefaultView;

                    seq_operation_num1.DataValueField = "route_id";

                    seq_operation_num1.DataBind();
                }
                else
                {
                    PageUtil.showToast(this.Page, "数据载入出错");
                }
                seq_operation_num1.Items.Insert(0, "选择制程");
            }
        }