public JsonResult _Insert(SparInvoiceRecon ins) { //...Fix InvoiceNumber InvoiceNumberGRVType data = ReconRep.FilterInvoiceNumber(ins.InvoiceNumber); ins.InvoiceNumber = data.InvoiceNumber; ins.GRVTypeId = data.GRVTypeId; GRVRep.UpdateStateDate(ins.GRVDate, ins.InvoiceNumber, ins.SupplierId, ins.GRVTypeId); SparInvoiceRecon ins2 = ReconRep.Insert(ins); //...Repopulate Grid... return(Json(new GridModel(ReconRep.GetRecons()))); }
public JsonResult _Update(SparInvoiceRecon ins) { //...Fix InvoiceNumber if ((ins.InvoiceNumber.Contains(" - GRV")) || (ins.InvoiceNumber.Contains(" - CLM"))) { InvoiceNumberGRVType data = ReconRep.FilterInvoiceNumber(ins.InvoiceNumber); ins.InvoiceNumber = data.InvoiceNumber; ins.GRVTypeId = data.GRVTypeId; } GRVRep.UpdateStateDate(ins.GRVDate, ins.InvoiceNumber, ins.SupplierId, ins.GRVTypeId); SparInvoiceRecon ins2 = ReconRep.Update(ins); //...Repopulate Grid... return(Json(new GridModel(ReconRep.GetRecons()))); }
public ActionResult _InsertPaymentFromMulti(SparInvoiceRecon ins) { //...Fix InvoiceNumber InvoiceNumberGRVType data = ReconRep.FilterInvoiceNumber(ins.InvoiceNumber); ins.InvoiceNumber = data.InvoiceNumber; ins.GRVTypeId = data.GRVTypeId; GRVRep.UpdateStateDate(ins.GRVDate, ins.InvoiceNumber, ins.SupplierId, ins.GRVTypeId); SparInvoiceRecon ins2 = ReconRep.Insert(ins); string Status = ReconRep.GetReconStatus(ins2.SparReconId); if (Status != "null") { return(Content(Status.ToString() + " " + ins2.InvoiceNumber.ToString(), "text/html")); } else { return(Content("0", "text/html")); } }