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.
94 lines
3.1 KiB
C#
94 lines
3.1 KiB
C#
using CommonFunc;
|
|
using CommonFunc.Tools;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
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.Shapes;
|
|
using XGL.Data;
|
|
using XGL.Data.DBService;
|
|
using XGL.Dats.DBServiceFinishProd;
|
|
using XGL.Models.Model;
|
|
|
|
namespace XGLFinishPro.Views
|
|
{
|
|
/// <summary>
|
|
/// AuxiliaryPersonnel.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class AuxiliaryPersonnel : Window
|
|
{
|
|
FinishProdDBService dbAuth = new FinishProdDBService();
|
|
FormingMachineService dbService = new FormingMachineService();
|
|
userDB usdb = new userDB();
|
|
private List<sys_user> userList = new List<sys_user>();
|
|
private readonly sys_user user;
|
|
private string childprocess_code;
|
|
private string childprocess_name;
|
|
private string workorder_code_sap;
|
|
private string product_code;
|
|
private string product_name;
|
|
private string workorder_code;
|
|
private string line_code;
|
|
private string attr1;
|
|
public AuxiliaryPersonnel(sys_user user, string childprocess_code, string childprocess_name, string workorder_code, string workorder_code_sap, string product_code, string product_name, string line_code, string attr1)
|
|
{
|
|
InitializeComponent();
|
|
this.user = user;
|
|
this.workorder_code = workorder_code;
|
|
this.childprocess_code = childprocess_code;
|
|
this.childprocess_name = childprocess_name;
|
|
this.workorder_code_sap = workorder_code_sap;
|
|
this.product_code = product_code;
|
|
this.product_name = product_name;
|
|
this.line_code = line_code;
|
|
this.OrderNumber.Text = workorder_code;
|
|
this.ProductName.Text = product_name;
|
|
this.attr1 = attr1;
|
|
}
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
this.NickName.Text = user.nick_name;
|
|
this.Position.Text = user.post;
|
|
}
|
|
|
|
private void AddButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
int rows = dbService.InsertMesUnitPriceReport(user.user_name,
|
|
user.nick_name, user.post,
|
|
this.HourlyWage.Text,
|
|
this.Deduction.Text,
|
|
this.Description.Text,
|
|
line_code,
|
|
"0000000" + product_code,
|
|
product_name,
|
|
childprocess_code,
|
|
childprocess_name,
|
|
workorder_code,
|
|
workorder_code_sap,
|
|
LoginUser.WorkDate,
|
|
attr1
|
|
);
|
|
if (rows > 0)
|
|
MessageBox.Show("保存成功!");
|
|
else
|
|
MessageBox.Show("保存失败!");
|
|
this.Close();
|
|
}
|
|
|
|
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
}
|
|
}
|