Beispiel #1
0
        private void navBanHang_Click(object sender, EventArgs e)
        {
            MainBanHang frmBanHang = new MainBanHang(1)
            {
                Dock = DockStyle.Fill, WindowState = FormWindowState.Maximized
            };

            frmBanHang.Show();
            this.Hide();
        }
        private void btnTienMat_Click(object sender, EventArgs e)
        {
            Dialog_ThanhToan thanhtoan = new Dialog_ThanhToan(Convert.ToDouble(txtThanhTien.Text.Trim()), dataGridView1.Rows[0].Cells[0].Value.ToString(), ban.MaBan, flagq)
            {
                StartPosition = FormStartPosition.CenterScreen
            };

            thanhtoan.ShowDialog();

            this.Dispose();
            MainBanHang main = new MainBanHang(flagq)
            {
                WindowState = FormWindowState.Maximized
            };

            main.Show();
        }
        private void buttonX1_Click(object sender, EventArgs e)
        {
            //admin - Quản Lý
            if ((textBoxX1.Text.Trim().Equals("admin") || textBoxX1.Text.Trim().Equals("Admin")) && (textBoxX2.Text.Trim().Equals("admin") || textBoxX2.Text.Trim().Equals("Admin")))
            {
                frmMain frmmain = new frmMain();
                this.Hide();
                frmmain.Show();
            }

            //Người Dùng - Nhân Viên
            else
            {
                MainBanHang frmmainBH = new MainBanHang(0)
                {
                    WindowState = FormWindowState.Maximized
                };
                this.Hide();
                frmmainBH.Show();
            }
        }