You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.4 KiB
C#
76 lines
2.4 KiB
C#
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_InOut.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class LanJu_InOut : UserControl
|
|
{
|
|
|
|
FormingMachineService formingMachineService = new FormingMachineService();
|
|
|
|
|
|
public LanJu_InOut()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
GetInOutRecordInfo();
|
|
}
|
|
|
|
private void GetInOutRecordInfo()
|
|
{
|
|
try
|
|
{
|
|
List<FoamingMacModel> orderList = new List<FoamingMacModel>();
|
|
|
|
//modelWareHouse = new List<WorkOrder>();
|
|
//userDbWareHouse = new DBService();
|
|
DataTable dt = formingMachineService.GetInOutHistoryList(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.begin = Convert.ToDateTime(i["begin"].ToString());
|
|
order.beout = Convert.ToDateTime(i["beout"].ToString());
|
|
order.product_code = i["product_code"].ToString();
|
|
order.car_num = Convert.ToInt32(i["car_num"].ToString());
|
|
order.product_date = i["product_date"].ToString();
|
|
order.create_by = i["create_by"].ToString();
|
|
|
|
orderList.Add(order);
|
|
|
|
}
|
|
this.dgInOutRecord.ItemsSource = null;
|
|
this.dgInOutRecord.ItemsSource = orderList;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.instance.log.Error("获取出入记录信息时发生异常:" + ex.Message);
|
|
}
|
|
}
|
|
}
|
|
}
|