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