private void backBtn_Click(object sender, EventArgs e)
        {
            MENU_KETOAN m = new MENU_KETOAN();

            m.Show();
            this.Dispose();
        }
Exemplo n.º 2
0
        private void ihd_btn_Click(object sender, EventArgs e)
        {
            MessageBox.Show("In hóa đơn thành công");
            MENU_KETOAN nvkt = new MENU_KETOAN();

            nvkt.Show();
            this.Dispose();
        }
Exemplo n.º 3
0
        private void luu_btn_Click(object sender, EventArgs e)
        {
            MessageBox.Show("In hóa đơn thành công");

            try
            {
                Proc_luuhoadon();
            }
            catch
            {
                MessageBox.Show("Lỗi nhập liệu");
            }

            MENU_KETOAN m = new MENU_KETOAN();

            m.Show();
            this.Dispose();
        }
Exemplo n.º 4
0
        private void dangnhapBtn_Click(object sender, EventArgs e)
        {
            username = usernameText.Text;
            if (usernameText.Text == "NV01" && passwordText.Text == "abc")
            {
                MENU_TIEPNHAN menu = new MENU_TIEPNHAN();
                menu.Show();
                this.Hide();
            }
            else if (usernameText.Text == "NV01" && passwordText.Text != "abc")
            {
                errLabel.Text = "Sai mật khẩu!";
            }
            else if (usernameText.Text == "NV02" && passwordText.Text == "xyz")
            {
                MENU_KETOAN menu = new MENU_KETOAN();
                menu.Show();
                this.Hide();
            }
            else if (usernameText.Text == "NV02" && passwordText.Text != "xyz")
            {
                errLabel.Text = "Sai mật khẩu!";
            }
            else if (usernameText.Text == "NV03" && passwordText.Text == "def")
            {
                MENU_BOPHANVANPHONG menu = new MENU_BOPHANVANPHONG();
                menu.Show();
                this.Hide();
            }
            else if (usernameText.Text == "NV03" && passwordText.Text != "def")
            {
                errLabel.Text = "Sai mật khẩu!";
            }
            else
            {
                errLabel.Text = "Tài khoản không hợp lệ!";
            }

            /* if (String.IsNullOrEmpty(usernameText.Text))
             * {
             *   var t = new Timer();
             *   t.Interval = 2000;
             *   t.Tick += (s, en) =>
             *   {
             *       usernameError.Hide();
             *       t.Stop();
             *   };
             *   t.Start();
             *   usernameError.Text = "Vui lòng nhập username.";
             * }
             *
             * if (String.IsNullOrEmpty(password_Text.Text))
             * {
             *   var t = new Timer();
             *   t.Interval = 2000;
             *   t.Tick += (s, en) =>
             *   {
             *       passwordError.Hide();
             *       t.Stop();
             *   };
             *   t.Start();
             *   passwordError.Text = "Vui lòng nhập password.";
             * }
             *
             * if ((!String.IsNullOrEmpty(usernameText.Text)) & (!String.IsNullOrEmpty(password_Text.Text)))
             * {
             *   if ((nvkt_radio.Checked == false) & (nvtp_radio.Checked == false))
             *   {
             *       var t = new Timer();
             *       t.Interval = 2000;
             *       t.Tick += (s, en) =>
             *       {
             *           radioError.Hide();
             *           t.Stop();
             *       };
             *       t.Start();
             *       radioError.Text = "Vui lòng chọn loại người dùng.";
             *   }
             *   if (nvkt_radio.Checked == true)
             *   {
             *       this.Close();
             *       payInput pi = new payInput();
             *       pi.Show();
             *   }
             *   else if (nvtp_radio.Checked == true)
             *   {
             *       nvtpOption nvtp = new nvtpOption();
             *       nvtp.Show();
             *       this.Hide();
             *   }
             * }*/
        }