private void btnNew_Click_1(object sender, EventArgs e) { MyKadVerifcationForm f = new MyKadVerifcationForm(); f.ShowDialog(); if (f.ProfileInfo == null) return; if (!f.ProfileInfo.IsVerified) return; txtNameOfApplicant.Text = f.ProfileInfo.FullName; txtMyKad.Text = f.ProfileInfo.IcNo; txtDateOfBirth.Text = f.ProfileInfo.DateOfBirth.ToString("dd/MM/yyyy"); if (f.ProfileInfo.Gender.ToLower() == "male") { rbMale.Checked = true; //chkMale.Checked = true; //chkFemale.Checked = false; } else { rbFemale.Checked = true; //chkFemale.Checked = true; //chkMale.Checked = false; } //groupBox1.Enabled = true; //groupBox2.Enabled = true; //groupBox3.Enabled = true; btnNext.Enabled = true; }
private void btnMyKad_Click(object sender, EventArgs e) { MyKadVerifcationForm f = new MyKadVerifcationForm(); f.ShowDialog(); if (f.ProfileInfo == null) { MessageBox.Show("Verification Failed"); return; } if (!f.ProfileInfo.IsVerified) { MessageBox.Show("Verification Failed"); return; } txtMyKadFullName.Text = f.ProfileInfo.FullName; txtMyKad.Text = f.ProfileInfo.IcNo; // txtDob.Text = f.ProfileInfo.DateOfBirth.ToString("dd/MM/yyyy"); txtGender.Text = f.ProfileInfo.Gender; //btnContinue.Enabled = true; //LocalAuthProcessingForm lapf = new LocalAuthProcessingForm(_mp, f.ProfileInfo); //lapf.ShowDialog(); if (f.ProfileInfo == null) { MessageBox.Show("Auhtentication Failed"); return; } _mp.UserProfile = f.ProfileInfo; _mp.ShowForm(FormType.DeviceRegistrationForm); }
private void btnNew_Click(object sender, EventArgs e) { MyKadVerifcationForm f = new MyKadVerifcationForm(); f.ShowDialog(); if (f.ProfileInfo == null) return; if (!f.ProfileInfo.IsVerified) return; btnNext.Enabled = true; }
private void btnNew_Click(object sender, EventArgs e) { MyKadVerifcationForm f = new MyKadVerifcationForm(); f.ShowDialog(); if (f.ProfileInfo == null) return; if (!f.ProfileInfo.IsVerified) return; txtFullName.Text = f.ProfileInfo.FullName; txtMyKad.Text = f.ProfileInfo.IcNo; //txtDob.Text = f.ProfileInfo.DateOfBirth.ToString("dd/MM/yyyy"); txtGender.Text = f.ProfileInfo.Gender; groupBox1.Enabled = true; groupBox2.Enabled = true; groupBox3.Enabled = true; btnSave.Enabled = true; }
private void btnLogin_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(cbUserId.Text)) { MessageBox.Show("Please select a User id", "Login", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (string.IsNullOrEmpty(txtPassword.Text)) { MessageBox.Show("Please key in Password", "Login", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } bool isConnected = ConnectionService.CheckForInternetConnection(); DeviceRegistrationProcessingForm lapf = new DeviceRegistrationProcessingForm(_mp); lapf.ShowDialog(); if (isConnected) { bool result = _mp.AuthSvc.Authenticate(cbUserId.Text, txtPassword.Text); if (!result) { MessageBox.Show("Login failed. Please try again.", "Login", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } var user = _systemUserSvc.GetByUserId(cbUserId.Text); if (user == null) { MessageBox.Show("Login failed. Please try again.", "Login", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } _mp.UserProfile = user.ProfileInfo; } else { if (MessageBox.Show("There is no connection with the server.\nClick Yes to continue with Offline verification.", "No Connection", MessageBoxButtons.YesNoCancel) != System.Windows.Forms.DialogResult.Yes) { return; } MyKadVerifcationForm f = new MyKadVerifcationForm(); f.ShowDialog(); if (f.ProfileInfo == null) { MessageBox.Show("Verification Failed"); return; } if (!f.ProfileInfo.IsVerified) { MessageBox.Show("Verification Failed"); return; } _mp.UserProfile = f.ProfileInfo; } _mp.ShowForm(FormType.MainForm); this.Hide(); }