protected void Page_Load(object sender, EventArgs e)
        {
            Session["Local"] = "领料单申请";
            if (Session["LoginName"] == null)
            {
                PageUtil.showToast(this, "未获取到你的登陆状态,请退出系统重新登录!");
                return;
            }
            else
            {
                user = Session["LoginName"].ToString();
            }


            if (!IsPostBack)
            {
                DataSet ds_Flax_value   = invoiceDC.getFlex_value();
                DataSet ds_Route        = invoiceDC.getRoute();
                DataSet ds_return_wo_no = invoiceDC.getIssueWo_no();

                if (ds_Flax_value != null)
                {
                    DropDownList_Flax_value.DataSource     = ds_Flax_value.Tables[0].DefaultView;
                    DropDownList_Flax_value.DataValueField = "flex_value";
                    DropDownList_Flax_value.DataTextField  = "flex_value";
                    DropDownList_Flax_value.DataBind();
                }
                if (ds_Route != null)
                {
                    DropDownList_operation_seq_num.DataSource     = ds_Route.Tables[0].DefaultView;
                    DropDownList_operation_seq_num.DataTextField  = "route";
                    DropDownList_operation_seq_num.DataValueField = "route_id";
                    DropDownList_operation_seq_num.DataBind();
                }

                if (ds_return_wo_no != null)
                {
                    DropDownList_issue_wo_no.DataSource     = ds_return_wo_no.Tables[0].DefaultView;
                    DropDownList_issue_wo_no.DataValueField = "wo_no";
                    DropDownList_issue_wo_no.DataTextField  = "wo_no";
                    DropDownList_issue_wo_no.DataBind();
                }

                DropDownList_Flax_value.Items.Insert(0, "--选择部门代码--");
                DropDownList_description.Items.Insert(0, "--选择部门名称--");
                DropDownList_item_name.Items.Insert(0, "--选择小料号--");
                DropDownList_operation_seq_num.Items.Insert(0, "--选择制程--");
                //DropDownList_frame_key.Items.Insert(0, "--选择料架--");
                DropDownList_issue_wo_no.Items.Insert(0, "--选择工单--");
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["Local"] = "调拨单申请";
            if (Session["LoginName"] == null)
            {
                PageUtil.showToast(this, "未获取到你的登陆状态,请退出系统重新登录!");
                return;
            }
            else
            {
                user = Session["LoginName"].ToString();
            }


            if (!IsPostBack)
            {
                DataSet ds_Flax_value = invoiceDC.getFlex_value();
                DataSet ds_Route      = invoiceDC.getRoute();
                //DataSet ds_out_frame_key = invoiceDC.getFrameByMaterial_io();
                //DataSet ds_in_frame_key = invoiceDC.getFrame();
                DataSet ds_out_subinventory = invoiceDC.getSubinventory();
                DataSet ds_in_subinventory  = invoiceDC.getSubinventory_name();
                if (ds_Flax_value != null)
                {
                    DropDownList_Flax_value.DataSource     = ds_Flax_value.Tables[0].DefaultView;
                    DropDownList_Flax_value.DataValueField = "flex_value";
                    DropDownList_Flax_value.DataTextField  = "flex_value";
                    DropDownList_Flax_value.DataBind();
                }
                if (ds_Route != null)
                {
                    DropDownList_operation_seq_num.DataSource     = ds_Route.Tables[0].DefaultView;
                    DropDownList_operation_seq_num.DataTextField  = "route";
                    DropDownList_operation_seq_num.DataValueField = "route_id";
                    DropDownList_operation_seq_num.DataBind();
                }
                if (ds_out_subinventory != null)
                {
                    DropDownList_out_subinventory.DataSource     = ds_out_subinventory.Tables[0].DefaultView;
                    DropDownList_out_subinventory.DataTextField  = "subinventory";
                    DropDownList_out_subinventory.DataValueField = "subinventory_key";
                    DropDownList_out_subinventory.DataBind();
                }
                if (ds_in_subinventory != null)
                {
                    DropDownList_in_subinventory.DataSource     = ds_in_subinventory.Tables[0].DefaultView;
                    DropDownList_in_subinventory.DataTextField  = "subinventory_name";
                    DropDownList_in_subinventory.DataValueField = "subinventory_key";
                    DropDownList_in_subinventory.DataBind();
                }
                //if (ds_out_frame_key != null)
                //{
                //    DropDownList_out_frame_key.DataSource = ds_out_frame_key.Tables[0].DefaultView;
                //    DropDownList_out_frame_key.DataTextField = "frame_name";
                //    DropDownList_out_frame_key.DataValueField = "frame_name";
                //    DropDownList_out_frame_key.DataBind();
                //}
                //if (ds_in_frame_key != null)
                //{
                //    DropDownList_in_frame_key.DataSource = ds_in_frame_key.Tables[0].DefaultView;
                //    DropDownList_in_frame_key.DataTextField = "frame_name";
                //    DropDownList_in_frame_key.DataValueField = "frame_name";
                //    DropDownList_in_frame_key.DataBind();
                //}

                DropDownList_Flax_value.Items.Insert(0, "--选择部门代码--");
                DropDownList_description.Items.Insert(0, "--选择部门名称--");
                DropDownList_item_name.Items.Insert(0, "--选择料号--");
                DropDownList_operation_seq_num.Items.Insert(0, "--选择制程--");
                DropDownList_out_subinventory.Items.Insert(0, "--选择调出库别--");
                DropDownList_in_subinventory.Items.Insert(0, "--选择调入库别--");
                //DropDownList_out_frame_key.Items.Insert(0, "--选择调出料架--");
                //DropDownList_in_frame_key.Items.Insert(0, "--选择调入料架--");
            }
        }