using CommonFunc; 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; namespace XGLFinishPro.Views { /// /// CheckUserWin.xaml 的交互逻辑 /// public partial class CheckUserWin : Window { private UserLogin ul; public bool loginFlag; public CheckUserWin() { InitializeComponent(); } private void btnCancel_Click(object sender, RoutedEventArgs e) { this.Close(); } private void btnOK_Click(object sender, RoutedEventArgs e) { userDB usdb = new userDB(); bool islogin = usdb.Login(txtUserID.Text.Trim(), pw.Password.Trim(), LoginUser.ShiftCode, LoginUser.TeamCode,LoginUser.WorkDate,LoginUser.Start_Time,LoginUser.End_Time); if (islogin) { loginFlag = islogin; tbMsg.Content = "校验成功"; this.Close(); } else { loginFlag = islogin; tbMsg.Content = "校验失败"; } } private void txtUserID_TextChanged(object sender, TextChangedEventArgs e) { this.tbMsg.Content = ""; } private void pw_PasswordChanged(object sender, RoutedEventArgs e) { tbMsg.Content = ""; } private void Window_Loaded(object sender, RoutedEventArgs e) { txtUserID.Text = "admin"; pw.Password = "admin123"; } } }