готова второй раз
This commit is contained in:
parent
777ad9a658
commit
e574952343
@ -10,14 +10,12 @@ public class TripTicket
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public int TicketId { get; private set; }
|
||||
public int Count { get; private set; }
|
||||
public static TripTicket CreateElement(int id, int ticketId, int count)
|
||||
public static TripTicket CreateElement(int id, int ticketId)
|
||||
{
|
||||
return new TripTicket
|
||||
{
|
||||
Id = id,
|
||||
TicketId = ticketId,
|
||||
Count = count
|
||||
TicketId = ticketId
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -50,12 +50,11 @@ namespace ProjectPassengerTransfers.Forms
|
||||
var list = new List<TripTicket>();
|
||||
foreach (DataGridViewRow row in dataGridViewTickets.Rows)
|
||||
{
|
||||
if (row.Cells["ColumnFeed"].Value == null ||
|
||||
row.Cells["ColumnCount"].Value == null)
|
||||
if (row.Cells["ColumnFeed"].Value == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
list.Add(TripTicket.CreateElement(0, Convert.ToInt32(row.Cells["ColumnBus"].Value), Convert.ToInt32(row.Cells["ColumnCount"].Value)));
|
||||
list.Add(TripTicket.CreateElement(0, Convert.ToInt32(row.Cells["ColumnBus"].Value)));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user