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.getWo_no(); //DataSet ds_frame_key = invoiceDC.getFrame(); DataSet ds_return_sub_key = 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_return_wo_no != null) { DropDownList_return_wo_no.DataSource = ds_return_wo_no.Tables[0].DefaultView; DropDownList_return_wo_no.DataValueField = "wo_no"; DropDownList_return_wo_no.DataTextField = "wo_no"; DropDownList_return_wo_no.DataBind(); } //if (ds_frame_key != null) //{ // DropDownList_frame_key.DataSource = ds_frame_key.Tables[0].DefaultView; // DropDownList_frame_key.DataValueField = "frame_name"; // DropDownList_frame_key.DataTextField = "frame_name"; // DropDownList_frame_key.DataBind(); //} if (ds_return_sub_key != null) { DropDownList_return_sub_key.DataSource = ds_return_sub_key.Tables[0].DefaultView; DropDownList_return_sub_key.DataValueField = "subinventory_key"; DropDownList_return_sub_key.DataTextField = "subinventory_name"; DropDownList_return_sub_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_return_sub_key.Items.Insert(0, "--选择库别--"); DropDownList_return_wo_no.Items.Insert(0, "--选择工单--"); //DropDownList_frame_key.Items.Insert(0, "--选择料架--"); } }