public ServiceList()
        {
            InitializeComponent();
            txtUnit.KeyPress += TxtMoney_KeyPress;
            txtPrice.KeyPress += TxtMoney_KeyPress;
            Load += ServiceList_Load;
            dgvService.SelectionChanged += DgvService_SelectionChanged;

            this.resetUI();

            this.serviceBLT = new ServiceBLT();
            this.dgvService.DataSource = serviceBLT.getListService();
        }
Exemplo n.º 2
0
        public void Init()
        {
            InitializeComponent();
            serviceNoteBLT = new ServiceNoteBLT();
            contractBLT = new ContractBLT();
            serviceBLT = new ServiceBLT();
            cmbContractId.DataSource = contractBLT.getListContract();
            cmbContractId.DisplayMember = "Name";
            cmbContractId.ValueMember = "Id";

            (this.dgvServiceNoteDetail.Columns["clServiceName"] as DataGridViewComboBoxColumn).DataSource = serviceBLT.getListService();
            (this.dgvServiceNoteDetail.Columns["clServiceName"] as DataGridViewComboBoxColumn).DisplayMember = "Name";
            (this.dgvServiceNoteDetail.Columns["clServiceName"] as DataGridViewComboBoxColumn).ValueMember = "Id";
            (this.dgvServiceNoteDetail.Columns["clServiceName"] as DataGridViewComboBoxColumn).DataPropertyName = "ServiceID";
        }
        public void Init()
        {
            InitializeComponent();
            Load += ContractEdit_Load;
            contractBLT = new ContractBLT();
            serviceBLT = new ServiceBLT();
            roomBLT = new RoomBLT();
            customerBLT = new CustomerBLT();
            dateTimePickerBeginDate.MaxDate = DateTime.Now;
            dateTimePickerBeginDate.Value = dateTimePickerBeginDate.MaxDate;
            dateTimePickerEndDate.Value = dateTimePickerBeginDate.MaxDate;
            dgvService.AutoGenerateColumns = false;
            dgvService.AllowUserToDeleteRows = false;
            dgvService.AllowUserToAddRows = false;

            cmbRoom.DisplayMember = "NAME";
            cmbRoom.ValueMember = "ID";

            cmbCustomer.DisplayMember = "NAME";
            cmbCustomer.ValueMember = "ID";
            cmbCustomer.DataSource = customerBLT.getListCustomer();

            txtDuration.KeyPress += TxtMoney_KeyPress;
            txtPriceRoom.KeyPress += TxtMoney_KeyPress;
            txtDeposit.KeyPress += TxtMoney_KeyPress;
            txtBail.KeyPress += TxtMoney_KeyPress;
            txtRest.KeyPress += TxtMoney_KeyPress;

            txtPriceRoom.TextChanged += TxtMoney_TextChanged;
            txtDeposit.TextChanged += TxtMoney_TextChanged;
        }