|
|
|
|
|
using CommonFunc;
|
|
|
|
|
|
using CommonFunc.Tools;
|
|
|
|
|
|
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.Data.DBService;
|
|
|
|
|
|
using XGL.Models.Model.FoamingMac;
|
|
|
|
|
|
|
|
|
|
|
|
namespace XGL.Views
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// LanJu_Complete.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class LanJu_Complete : UserControl
|
|
|
|
|
|
{
|
|
|
|
|
|
FormingMachineService formingMachineService = new FormingMachineService();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public LanJu_Complete()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
GetInfo();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void GetInfo()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
List<FoamingMacModel> orderList = new List<FoamingMacModel>();
|
|
|
|
|
|
|
|
|
|
|
|
//modelWareHouse = new List<WorkOrder>();
|
|
|
|
|
|
//userDbWareHouse = new DBService();
|
|
|
|
|
|
DataTable dt = formingMachineService.GetCompleteHistoryList(Utils.GetAppSetting("DeviceCode"));
|
|
|
|
|
|
if (dt == null) return;
|
|
|
|
|
|
foreach (DataRow i in dt.Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
FoamingMacModel order = new FoamingMacModel();
|
|
|
|
|
|
order.workorder_code = i["workorder_code"].ToString();
|
|
|
|
|
|
order.product_name = i["product_name"].ToString();
|
|
|
|
|
|
|
|
|
|
|
|
order.product_code = i["product_code"].ToString();
|
|
|
|
|
|
order.car_num = Convert.ToInt32(i["car_num"].ToString());
|
|
|
|
|
|
order.product_date = i["update_time"].ToString();
|
|
|
|
|
|
//order.create_by = i["create_by"].ToString();
|
|
|
|
|
|
|
|
|
|
|
|
orderList.Add(order);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
this.datagrid1.ItemsSource = orderList;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
LogHelper.instance.log.Error("获取完成记录信息时发生异常:" + ex.Message);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void datagrid1_LoadingRow(object sender, DataGridRowEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
e.Row.Header = (e.Row.GetIndex() + 1).ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|