public ActionResult AjaxSave(int receiptId, int id) { var receiptRecord = new Models.ReceiptRecord { Id = id }; if (TryUpdateModel(receiptRecord)) { _receiptRecordRepository.Update(Mapper.Map<Code.DataAccess.ReceiptRecord>(receiptRecord)); } return View(GetReceiptRecordsGridModel(receiptId)); }
public ActionResult AjaxInsert(int receiptId) { var receiptRecord = new Models.ReceiptRecord(); if (TryUpdateModel(receiptRecord)) { var newReceiptRecord = Mapper.Map<Code.DataAccess.ReceiptRecord>(receiptRecord); newReceiptRecord.ReceiptId = receiptId; _receiptRecordRepository.Insert(newReceiptRecord); } return View(GetReceiptRecordsGridModel(receiptId)); }
public ActionResult AjaxSave(int receiptId, int id) { throw new NotImplementedException(); var receiptRecord = new Models.ReceiptRecord { Id = id }; if (TryUpdateModel(receiptRecord)) { _receiptRecordRepository.Update(Mapper.Map<Code.DataAccess.ReceiptRecord>(receiptRecord)); } // return View(GetReceiptRecordsGridModel(receiptId)); }