Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }