public void InsertInvoice(Invoice invo) { if (invo.Collected == true) { invo.Act_CollectedDate = DateTime.Now; } repo.InsertInvoice(invo); }
public void InsertInvoice(Invoice invoice) { List <Invoice> list = repo.GetInvoices(); int Count = list.Count(); foreach (var o in list) { if (o.InvoiceNo >= Count) { Count = o.InvoiceNo + 1; } } invoice.InvoiceNo = Count; repo.InsertInvoice(invoice); }
public void AddInvoice(Invoice i) { invo.InsertInvoice(i); }