Update DataForm.cs
This commit is contained in:
1 parent
75fa716046
commit
327041c3ab
1 file changed
+5
@@ -58,6 +58,8 @@ namespace PaymentLogs
|
|||||||
foreach (DataGridViewRow row in dataGridView1.Rows)
|
foreach (DataGridViewRow row in dataGridView1.Rows)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if(row.Cells.Count > 1)
|
||||||
{
|
{
|
||||||
Payment payment = new Payment
|
Payment payment = new Payment
|
||||||
{
|
{
|
||||||
@@ -69,6 +71,9 @@ namespace PaymentLogs
|
|||||||
Debt = Convert.ToInt32(row.Cells["debt"].Value)
|
Debt = Convert.ToInt32(row.Cells["debt"].Value)
|
||||||
};
|
};
|
||||||
Program.PaymentRepository.Update(payment.Id, payment);
|
Program.PaymentRepository.Update(payment.Id, payment);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch(NullReferenceException ignored)
|
} catch(NullReferenceException ignored)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ignored.Message);
|
Console.WriteLine(ignored.Message);
|
||||||
|
|||||||
Reference in new issue
Block a user