private bool TicketSearchByArrivalStationAndPrise()
 {
     if (cbTicAS.SelectedIndex != 0 && GetPrice() != null)
     {
         dgvTickets.DataSource = TicketDAL.GetTicketsByAsPrice(IntermediateStationDAL.GetIntermediateStationByName(cbTicAS.Text).Id_IntermediateStation, GetPrice());
         return(true);
     }
     return(false);
 }
 private bool TicketSearchByArrivalStation()
 {
     if (cbTicAS.SelectedIndex != 0)
     {
         dgvTickets.DataSource = TicketDAL.GetTicketsByAs(IntermediateStationDAL.GetIntermediateStationByName(cbTicAS.Text).Id_IntermediateStation);
         return(true);
     }
     return(false);
 }
Exemple #3
0
        private void InsertTicket()
        {
            int price    = int.Parse(tbPrice.Text);
            int FIO      = PassengerDAL.GetAllPassengers()[cbFIO.SelectedIndex].Id_Passenger;
            int trip     = int.Parse(cbNumTrip.Text);
            int dSt      = IntermediateStationDAL.GetIntermediateStationByName(cbDS.Text).Id_IntermediateStation;
            int aSt      = IntermediateStationDAL.GetIntermediateStationByName(cbAS.Text).Id_IntermediateStation;
            int type     = CarriageTypeDAL.GetCarriageTypeByType(cbType.Text).Id_CarriageType;
            int plaseNum = int.Parse(nPlase.Value.ToString());

            TicketDAL.Insert(price, FIO, trip, dSt, aSt, type, plaseNum);
        }