using CentralControl.DBDAO; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using XGL.Thrift; namespace XGL.Views { /// /// LanJu_Prepare.xaml 的交互逻辑 /// public partial class LanJu_Prepare : UserControl { public LanJu_Prepare() { InitializeComponent(); GetWorkOrder(); } /// /// /// 获取主页显示订单 /// /// /// List modelWareHouse = new List(); DBService userDbWareHouse = new DBService(); WorkOrder list_modelWareHouse = new WorkOrder(); string messageOrderCode = ""; private void GetWorkOrder() { try { modelWareHouse = new List(); userDbWareHouse = new DBService(); var Items = userDbWareHouse.GetWorkOrderList(); foreach (DataRow i in Items.Rows) { list_modelWareHouse.WorkOrderCode = i["WorkOrderCode"].ToString(); list_modelWareHouse.OrderCode = i["OrderCode"].ToString(); list_modelWareHouse.ProductName = i["ProductName"].ToString(); list_modelWareHouse.ProductSpc = i["ProductSpc"].ToString(); list_modelWareHouse.QuantitySplit = i["QuantitySplit"].ToString(); list_modelWareHouse.BatchCode = i["BatchCode"].ToString(); modelWareHouse.Add(list_modelWareHouse); } this.WorkOrder.ItemsSource = modelWareHouse; } catch (Exception ex) { } } private void Flow_Click(object sender, RoutedEventArgs e) { var selectedRow = WorkOrder.SelectedItem as WorkOrder; var workordercode = selectedRow.WorkOrderCode; } } }