Beispiel #1
0
        public override void GetData()
        {
            daybookList = service.GetDayBooks(this.SelectedDate);

            dataLoaded = true;
            RefreshGridViews();
        }
Beispiel #2
0
        private void OnLoad()
        {
            var customers = _customerService.GetCustomers();

            dataSource = _daybookService.GetDayBooks(0);

            DWTComboBoxItem customerItem = new DWTComboBoxItem {
                Text = "Select Customer", Value = 0
            };

            this.cboCustomer.Items.Add(customerItem);

            foreach (var customer in customers)
            {
                customerItem = new DWTComboBoxItem {
                    Text = customer.Name, Value = customer.CustID
                };
                cboCustomer.Items.Add(customerItem);
            }
            cboCustomer.SelectedIndex      = 0;
            this.bsourceInvoice.DataSource = dataSource;
        }
Beispiel #3
0
        private void OnLoad()
        {
            var customers  = _customerService.GetCustomers();
            var drivers    = _driverService.GetDrivers();
            var trucks     = _driverService.GetTrucks();
            var trailers   = _driverService.GetTrailers();
            var dataSource = _daybookService.GetDayBooks(0);

            DWTComboBoxItem customerItem = new DWTComboBoxItem {
                Text = "Select Customer", Value = 0
            };

            this.cboCustomer.Items.Add(customerItem);

            foreach (var customer in customers)
            {
                customerItem = new DWTComboBoxItem {
                    Text = customer.Name, Value = customer.CustID
                };
                cboCustomer.Items.Add(customerItem);
            }
            cboCustomer.SelectedIndex = 0;

            DWTComboBoxItem driverItem = new DWTComboBoxItem {
                Text = "Select Driver", Value = 0
            };

            this.cboDriver.Items.Add(driverItem);

            foreach (var driver in drivers)
            {
                driverItem = new DWTComboBoxItem {
                    Text = driver.Name, Value = driver.DriverID
                };
                cboDriver.Items.Add(driverItem);
            }
            cboDriver.SelectedIndex = 0;

            this.bsourceInvoice.DataSource = dataSource;


            DWTComboBoxItem truckItem = new DWTComboBoxItem {
                Text = "Select Truck", Value = 0
            };

            this.cboTrucks.Items.Add(truckItem);

            foreach (var truck in trucks)
            {
                truckItem = new DWTComboBoxItem {
                    Text = String.Format("{0}-{1}", truck.Name, truck.TruckNumber), Value = truck.Id
                };
                cboTrucks.Items.Add(truckItem);
            }
            cboTrucks.SelectedIndex = 0;

            DWTComboBoxItem trailerItem = new DWTComboBoxItem {
                Text = "Select Trailer", Value = 0
            };

            this.cboTrailers.Items.Add(trailerItem);

            foreach (var trailer in trailers)
            {
                trailerItem = new DWTComboBoxItem {
                    Text = String.Format("{0}-{1}", trailer.Name, trailer.TrailerName), Value = trailer.Id
                };
                cboTrailers.Items.Add(trailerItem);
            }
            cboTrailers.SelectedIndex = 0;
        }