private void UpdateTicket(int newVId, string newValue)
        {
            switch (Type)
            {
            case TicketConst.Trip:
                TicketDAL.UpdateTrip(int.Parse(newValue), Id);
                break;

            case TicketConst.Passenger:
                TicketDAL.UpdatePassenger(PassengerDAL.GetAllPassengers()[newVId].Id_Passenger, Id);
                break;

            case TicketConst.LandingStation:
                TicketDAL.UpdateLS(IntermediateStationDAL.GetAllIntermediateStations()[newVId].Id_IntermediateStation, Id);
                break;

            case TicketConst.ExitStation:
                TicketDAL.UpdateES(IntermediateStationDAL.GetAllIntermediateStations()[newVId].Id_IntermediateStation, Id);
                break;

            case TicketConst.Price:
                TicketDAL.UpdatePrice(int.Parse(newValue), Id);
                break;

            case TicketConst.CarriageType:
                TicketDAL.UpdateType(CarriageTypeDAL.GetAllCarriageTypes()[newVId].Id_CarriageType, Id);
                break;

            case TicketConst.PlaseNumber:
                TicketDAL.UpdatePlaseNumber(int.Parse(newValue), Id);
                break;
            }
        }
 private void FillingIntermediateStations()
 {
     foreach (IntermediateStation i in IntermediateStationDAL.GetAllIntermediateStations())
     {
         cbNew.Items.Add(StationDAL.GetStationByIntermediateStation(i.Id_IntermediateStation).Name);
     }
 }
Ejemplo n.º 3
0
 private void IntermediateStationsFilling()
 {
     foreach (IntermediateStation i in IntermediateStationDAL.GetAllIntermediateStations())
     {
         cbTicDS.Items.Add(StationDAL.GetStationByIntermediateStation(i.Id_IntermediateStation).Name);
         cbTicAS.Items.Add(StationDAL.GetStationByIntermediateStation(i.Id_IntermediateStation).Name);
     }
     cbTicDS.SelectedIndex = cbTicAS.SelectedIndex = 0;
 }