using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace AffectedApplicationDocumentScanner { public partial class LoginForm : Form { public LoginForm() { InitializeComponent(); } private void loginButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(idNumberTextBox.Text)) { MessageBox.Show(this, "Enter your ID number first.","Validation error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } var svc = new AffectedApplicationService.AffectedApplicationServiceClient(); if (svc.CheckIdNumber(idNumberTextBox.Text)) { this.Hide(); var appForm = new AppNumberForm(); appForm.IDNumber = idNumberTextBox.Text; appForm.Show(); } else { MessageBox.Show(this, "Invalid ID number.", "Validation error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } } }