Ejemplo n.º 1
0
        private void LoadAllServices()
        {
            //
            var list = LessLazyWorker.GetAllServices();

            list.Insert(0, new ServiceDisplay());
            ServiceComboBox.DataSource = list;

            ServiceComboBox.ValueMember   = "Id";
            ServiceComboBox.DisplayMember = "DisplayString";

            TotalPriceNumericUpDown.Value
                = LessLazyWorker.TotalPriceOfBill(currentBill.Id);
        }
Ejemplo n.º 2
0
        private void LoadAllServices()
        {
            LazyWorker <ServiceDisplay> .LoadAllToGridView
            (
                ServiceGridView,
                new string[] { "Id", "ServiceName", "Price", "BelongToRoom" },
                LessLazyWorker.GetAllServices()
            );

            ServiceGridView.Columns["Id"].Visible = false;

            ServiceGridView.Columns["ServiceName"].HeaderText = "Tên dịch vụ";
            ServiceGridView.Columns["ServiceName"].Width      = 150;

            ServiceGridView.Columns["Price"].HeaderText = "Giá dịch vụ";
            ServiceGridView.Columns["Price"].AutoSizeMode
                = DataGridViewAutoSizeColumnMode.AllCells;
            ServiceGridView.Columns["Price"].DefaultCellStyle.Format = "### ### ### ###";

            ServiceGridView.Columns["BelongToRoom"].HeaderText = "Thuộc về phòng";
            ServiceGridView.Columns["BelongToRoom"].Width      = 150;

            ServiceGridView.Columns["Filter"].Visible = false;
        }