private void RefreshGrid()
 {
     try
     {
         List <Passenger> passengerList = __passBLL.GetAllBLL();
         dgvPassangerList.DataSource = null;
         dgvPassangerList.DataSource = passengerList;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
        private void TicketForm_Load(object sender, EventArgs e)
        {
            btnNextStep.Visible = false;

            RefreshGrid();

            cmbEmployeeID.ValueMember    = "ID";
            cmbPassengerID.DisplayMember = "ID";
            EmployeeBussiness empBLL = new EmployeeBussiness();

            cmbEmployeeID.DataSource = empBLL.GetAllBLL();

            cmbPassengerID.ValueMember   = "ID";
            cmbPassengerID.DisplayMember = "ID";
            PassengerBussiness _pass = new PassengerBussiness();

            cmbPassengerID.DataSource = _pass.GetAllBLL();

            cmbRouteID.ValueMember   = "ID";
            cmbRouteID.DisplayMember = "ID";
            RouteMapBussiness _route = new RouteMapBussiness();

            cmbRouteID.DataSource = _route.GetAllBLL();

            cmbSeatID.DisplayMember = "ID";
            cmbSeatID.ValueMember   = "ID";
            BusSeatBussiness busType = new BusSeatBussiness();

            cmbSeatID.DataSource = busType.GetAllBLL();

            cmbTicketID.DisplayMember = "ID";
            cmbTicketID.ValueMember   = "ID";
            cmbTicketID.DataSource    = _ticketBll.GetAllBLL();

            cmbTravelId.ValueMember   = "ID";
            cmbTravelId.DisplayMember = "ID";
            TravelBussiness _travel = new TravelBussiness();

            cmbTravelId.DataSource = _travel.GetAllBLL();

            cmbTicketID.ValueMember   = "ID";
            cmbTicketID.DisplayMember = "ID";
            PaymentBussiness _payy = new PaymentBussiness();

            cmbTicketID.DataSource = _payy.GetAllBLL();
        }