private void bttBack_Click(object sender, EventArgs e) { //Clear panel Body. _frmMain.panBody.Controls.Clear(); //Load page search. pageEnter_Password _pageEnter_Password = new pageEnter_Password(_frmMain); _frmMain.panBody.Controls.Add(_pageEnter_Password); _pageEnter_Password.Dock = DockStyle.Fill; _pageEnter_Password.BringToFront(); }
private void bttNext_Click(object sender, EventArgs e) { DateTime _selectConf = this.dtpSelectConf.Value; DateTime _startWork = Convert.ToDateTime(_frmMain._resultLogin.empDetial.startwork); //Check emp startwork. if (_selectConf.Date == _startWork.Date) { if (_controllors.SendOTP(_frmMain._resultLogin.empDetial)) { //Confirm OTP. frmEnter_OTP _frmOTP = new frmEnter_OTP(_frmMain._resultLogin.empDetial); _frmOTP.ShowDialog(); if (_frmOTP.DialogResult == DialogResult.OK) { //Set New Pass string newPass = _controllors.GetUniqueKey(8); _frmMain._resultLogin.empDetial.pass = newPass; if (_controllors.UpdatePassLoginFitelGroup(_frmMain._resultLogin.empDetial)) { //Sent new pass if (_controllors.SendNewPassword(_frmMain._resultLogin.empDetial) == true) { frmSuccess _succ = new frmSuccess(1); _succ.ShowDialog(); //Clear panel Body. _frmMain.panBody.Controls.Clear(); //Load page search. pageEnter_Password _pageEnter_Password = new pageEnter_Password(_frmMain); _frmMain.panBody.Controls.Add(_pageEnter_Password); _pageEnter_Password.Dock = DockStyle.Fill; _pageEnter_Password.BringToFront(); } } } } } else { MessageBox.Show("You choose the wrong start date. Please choose again.", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
private void bttNext_Click(object sender, EventArgs e) { if (this.txtEmpID.Text.Trim() == "") { return; } _empProperty = new EmpProperty { code = this.txtEmpID.Text.Trim() }; if (_controllors.CheckEmpCompanyExist(_empProperty) == true) { _empProperty = _controllors.GetEmpProperty(_empProperty); } else { this.txtEmpID.Text = ""; return; } _frmMain._resultLogin.empDetial = _empProperty; if (_controllors.CheckEmpFitelGroupExist(_empProperty) == true) { //Clear panel Body. _frmMain.panBody.Controls.Clear(); //Load page search. pageEnter_Password _pageEnter_User = new pageEnter_Password(_frmMain); _frmMain.panBody.Controls.Add(_pageEnter_User); _pageEnter_User.Dock = DockStyle.Fill; _pageEnter_User.BringToFront(); } else { //Clear panel Body. _frmMain.panBody.Controls.Clear(); //Load page search. pageEnter_Create _pageEnter_User = new pageEnter_Create(_frmMain); _frmMain.panBody.Controls.Add(_pageEnter_User); _pageEnter_User.Dock = DockStyle.Fill; _pageEnter_User.BringToFront(); } }