public static bool insertSupplierInvoice(APCEntities APCContext, string supplierOriNo, decimal paymentDue, DateTime dueDate, PO po) { if (supplierOriNo.Trim() != "") { SupplierInvoice supplierInvoice = new SupplierInvoice(); supplierInvoice.SupplierOriNo = supplierOriNo; supplierInvoice.PaymentDue = paymentDue; supplierInvoice.DueDate = dueDate; supplierInvoice.PO = po; supplierInvoice.Paid = false; APCContext.AddToSupplierInvoice(supplierInvoice); APCContext.SaveChanges(); return(true); } else { return(false); } }
public static bool insertSupplierInvoice(APCEntities APCContext, string supplierOriNo, decimal paymentDue, DateTime dueDate, PO po) { if (supplierOriNo.Trim() != "") { SupplierInvoice supplierInvoice = new SupplierInvoice(); supplierInvoice.SupplierOriNo = supplierOriNo; supplierInvoice.PaymentDue = paymentDue; supplierInvoice.DueDate = dueDate; supplierInvoice.PO = po; supplierInvoice.Paid = false; APCContext.AddToSupplierInvoice(supplierInvoice); APCContext.SaveChanges(); return true; } else return false; }