Esempio n. 1
0
        private void btnAddRoom_Click_1(object sender, EventArgs e)
        {
            var a = new WriteLog();

            a.ButtonWrite($"Thêm phòng thành công!!!");
            Table room = lsvBill.Tag as Table;

            if (room == null)
            {
                MessageBox.Show("Hãy chọn bàn!!!");
                return;
            }

            int idBill = BillDAL.Instance.GetUncheckBillIDByTableID(room.ID);

            int idRoom = (lsvBill.Tag as Table).ID;

            if (idBill == -1)//không có bill nào hết ;
            {
                BillDAL.Instance.InsertStartBill(room.ID);
            }
            else //Bill đã tồn tại
            {
                MessageBox.Show("Phòng này đã bắt đầu tính giờ", "Thông báo");
                return;
            }

            LoadRoomListByCategoryID(room.ID);

            LoadTable();
            ShowBill(room.ID);
        }
Esempio n. 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string userName = txtUserName.Text;
            string Password = txtPassWord.Text;

            if (Login(userName, Password))
            {
                var a = new WriteLog();
                a.ButtonWrite($"Đã đăng nhập hệ thống!!!");
                // fTableManager f = new fTableManager(loginAccount);
                TimerAndProgrespass t = new TimerAndProgrespass();
                this.Hide();
                t.Username = txtUserName.Text;

                // có 2 cách để truyền tài khoản này qua bên kia
                // cách 1: lấy tài khoản ngay bên này luôn
                ///cách 2 qua bên kia lấy, bên đây chúng ta chỉ lấy id thôi
                t.ShowDialog();
                // this.Show();
            }
            else
            {
                MessageBox.Show("sai tai khoản hoặc mật khẩu");
            }
        }