Example #1
0
        private void frmLogin_Main_Load(object sender, EventArgs e)
        {
            //Clear panel Body.
            this.panBody.Controls.Clear();

            //Load page search.
            pageEnter_User _pageEnter_User = new pageEnter_User(this);

            this.panBody.Controls.Add(_pageEnter_User);
            _pageEnter_User.Dock = DockStyle.Fill;
            _pageEnter_User.BringToFront();
        }
Example #2
0
        private void bttBack_Click(object sender, EventArgs e)
        {
            //Clear panel Body.
            _frmMain.panBody.Controls.Clear();

            //Load page search.
            pageEnter_User _pageEnter_User = new pageEnter_User(_frmMain);

            _frmMain.panBody.Controls.Add(_pageEnter_User);
            _pageEnter_User.Dock = DockStyle.Fill;
            _pageEnter_User.BringToFront();
        }
Example #3
0
        private void bttNext_Click(object sender, EventArgs e)
        {
            //Check empty
            if (this.txtPass.Text.Trim() == "" || this.txtConf.Text.Trim() == "")
            {
                return;
            }

            //Check Digit
            if (this.txtPass.Text.Trim().Length < 8 || this.txtConf.Text.Trim().Length < 8)
            {
                MessageBox.Show(" Use 8 characters or more.", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); return;
            }

            //Check Pass = Confirm
            if (this.txtPass.Text.Trim() == this.txtConf.Text.Trim())
            {
                //Send OTP to E-mail
                if (_controllors.SendOTP(_frmMain._resultLogin.empDetial))
                {
                    frmEnter_OTP _frmOTP = new frmEnter_OTP(_frmMain._resultLogin.empDetial);
                    _frmOTP.ShowDialog();
                    if (_frmOTP.DialogResult == DialogResult.OK)
                    {
                        _frmMain._resultLogin.empDetial.pass = this.txtPass.Text.Trim();
                        if (_controllors.InsertLoginFitelGroup(_frmMain._resultLogin.empDetial) == true)
                        {
                            frmSuccess _succ = new frmSuccess(1);
                            _succ.ShowDialog();

                            //Clear panel Body.
                            _frmMain.panBody.Controls.Clear();

                            //Load page search.
                            pageEnter_User _pageEnter_User = new pageEnter_User(_frmMain);
                            _frmMain.panBody.Controls.Add(_pageEnter_User);
                            _pageEnter_User.Dock = DockStyle.Fill;
                            _pageEnter_User.BringToFront();
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show("Passwords do not match.", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }