public ServiceNoteList()
        {
            InitializeComponent();
            dateTimePickerDate.MaxDate = DateTime.Now;
            dgvServiceNote.AutoGenerateColumns = false;
            txtTotalMoney.KeyPress += TxtMoney_KeyPress;
            Load += ServiceNoteList_Load;
            dgvServiceNote.SelectionChanged += DgvServiceNote_SelectionChanged;

            this.resetUI();

            this.serviceNoteBLT = new ServiceNoteBLT();
            this.contractBLT = new ContractBLT();
            this.roomBLT = new RoomBLT();
            this.tollBillsBLT = new TollBillsBLT();

            cmbContractId.DataSource = contractBLT.getListContract();
            cmbContractId.DisplayMember = "ID";
            cmbContractId.ValueMember = "ID";

            cmbRoomName.DataSource = roomBLT.getListRoom();
            cmbRoomName.DisplayMember = "NAME";
            cmbRoomName.ValueMember = "NAME";

            dgvServiceNote.DataSource = serviceNoteBLT.getListServiceNote();
        }
        public TollBillList()
        {
            InitializeComponent();
            Load += TollBillList_Load;
            dateTimePickerDate.MaxDate = DateTime.Now;
            dateTimePickerNoteService.MaxDate = DateTime.Now;
            dgvTollBills.AutoGenerateColumns = false;
            txtDebt.KeyPress += TxtMoney_KeyPress;
            txtDiscountMoney.KeyPress += TxtMoney_KeyPress;
            txtPriceRoom.KeyPress += TxtMoney_KeyPress;
            txtTotal.KeyPress += TxtMoney_KeyPress;
            txtTotalMoneyService.KeyPress += TxtMoney_KeyPress;
            Load += ServiceNoteList_Load;
            dgvTollBills.SelectionChanged += DgvTollBills_SelectionChanged;

            this.resetUI();

            this.roomBLT = new RoomBLT();
            this.tollBillsBLT = new TollBillsBLT();
            this.receiptsBLT = new ReceiptsBLT();
            this.serviceNoteBLT = new ServiceNoteBLT();

            cmbRoom.DataSource = roomBLT.getListRoom();
            cmbRoom.DisplayMember = "NAME";
            cmbRoom.ValueMember = "NAME";

            dgvTollBills.DataSource = tollBillsBLT.getListTollBill();
        }
        public void Init()
        {
            InitializeComponent();
            dateTimePickerDate.MaxDate = DateTime.Now;
            dgvServiceNoteDetail.AutoGenerateColumns = false;
            dgvServiceNoteDetail.AllowUserToDeleteRows = false;
            dgvServiceNoteDetail.AllowUserToAddRows = false;

            serviceNoteBLT = new ServiceNoteBLT();
            contractBLT = new ContractBLT();
            tollBillsBLT = new TollBillsBLT();
            debtBLT = new DebtBLT();

            var temp = new Contract()
            {
                IsValid = true
            };

            cmbRoom.DisplayMember = "ROOMNAME";
            cmbRoom.ValueMember = "ROOMID";
            cmbRoom.DataSource = contractBLT.searchContract(temp);
        }