예제 #1
0
파일: Form1.cs 프로젝트: pcthanh/POSEZ2U
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            if (usermodel.StaffID > 0)
            {
                var passcheck = StaffModel.Decrypt(usermodel.Password);
                var passinput = textBox1.Text;
                SetImgLogin(passinput);
                if (passinput.Count() == 4)
                {
                    if (passinput == passcheck)
                    {
                        if (CheckCallform == 0)
                        {
                            UserLoginModel.UserLoginInfo = usermodel;
                            frmMain frm = new frmMain();
                            frm.ShowDialog();
                            this.Close();
                        }
                        else
                        {

                            this.DialogResult = System.Windows.Forms.DialogResult.OK;
                            this.Close();
                        }

                    }
                    else
                    {
                        var passshow = textBox1.Text;
                        if (passshow.Count() > 0)
                        {
                            this.lblMessger.Visible = true;
                            //frmMessager frm = new frmMessager("Messenger", "Pin code isn't correct.");
                            //frm.ShowDialog();
                            textBox1.Text = "";
                        }

                    }
                }

            }
            else
            {
                var passshow = textBox1.Text;
                if (passshow.Count() > 0)
                {
                    frmMessager frm = new frmMessager("Messenger", "Please chose user name");
                    frmOpacity.ShowDialog(this, frm);
                    textBox1.Text = "";
                }

            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: pcthanh/POSEZ2U
 private void button9_Click(object sender, EventArgs e)
 {
     frmMain frm = new frmMain();
     frm.ShowDialog();
 }
예제 #3
0
파일: Form1.cs 프로젝트: pcthanh/POS
        private void button9_Click(object sender, EventArgs e)
        {
            frmMain frm = new frmMain();

            frm.ShowDialog();
        }
예제 #4
0
파일: Form1.cs 프로젝트: pcthanh/POS
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            if (usermodel.StaffID > 0)
            {
                var passcheck = StaffModel.Decrypt(usermodel.Password);
                var passinput = textBox1.Text;
                SetImgLogin(passinput);
                if (passinput.Count() == 4)
                {
                    if (passinput == passcheck)
                    {
                        if (CheckCallform == 0)
                        {
                            UserLoginModel.UserLoginInfo = usermodel;
                            frmMain frm = new frmMain();

                            frm.ShowDialog();
                            this.Close();
                        }
                        else
                        {
                            if (usermodel.DepartmentID == 1 || usermodel.DepartmentID == 2)
                            {
                                this.DialogResult          = System.Windows.Forms.DialogResult.OK;
                                UserVoidItem.UserLoginInfo = usermodel;
                                this.Close();
                            }
                            else
                            {
                                frmMessager frmMes = new frmMessager("Login", "You can not login!");
                                frmMes.ShowDialog();
                                this.DialogResult          = System.Windows.Forms.DialogResult.OK;
                                UserVoidItem.UserLoginInfo = usermodel;
                                this.Close();
                            }
                        }
                    }
                    else
                    {
                        var passshow = textBox1.Text;
                        if (passshow.Count() > 0)
                        {
                            this.lblMessger.Visible = true;
                            //frmMessager frm = new frmMessager("Messenger", "Pin code isn't correct.");
                            //frm.ShowDialog();
                            textBox1.Text = "";
                        }
                    }
                }
            }
            else
            {
                var passshow = textBox1.Text;
                if (passshow.Count() > 0)
                {
                    frmMessager frm = new frmMessager("Messenger", "Please chose user name");
                    frmOpacity.ShowDialog(this, frm);
                    textBox1.Text = "";
                }
            }
        }
예제 #5
0
 private void btnBack_Click(object sender, EventArgs e)
 {
     frmMain frm = new frmMain();
     this.Close();
     frm.ShowDialog();
 }