|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
public AuxiliaryPersonnel(sys_user user)
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
this.user = user;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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, Utils.GetAppSetting("DeviceCode"));
|
|
|
|
|
|
if (rows <= 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
rows = dbService.InsertMesUnitPriceReport(user.user_name, user.nick_name, user.post, this.HourlyWage.Text, this.Deduction.Text, this.Description.Text, Utils.GetAppSetting("DeviceCode"));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (rows > 0)
|
|
|
|
|
|
MessageBox.Show("保存成功!");
|
|
|
|
|
|
else
|
|
|
|
|
|
MessageBox.Show("保存失败!");
|
|
|
|
|
|
this.Close();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Close();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|