/// <summary> /// Saves this instance. /// </summary> /// <returns></returns> public long Save(bool isAutoGenerateParallel) { var fixedAssetDecrement = new FixedAssetDecrementModel { FixedAssetDecrementDetails = View.FixedAssetDecrementDetails, RefId = View.RefId, RefTypeId = View.RefTypeId, PostedDate = View.PostedDate, RefDate = View.RefDate, RefNo = View.RefNo, AccountingObjectType = View.AccountingObjectType, AccountingObjectId = View.AccountingObjectId, CustomerId = View.CustomerId, VendorId = View.VendorId, EmployeeId = View.EmployeeId, CurrencyCode = View.CurrencyCode, ExchangeRate = View.ExchangeRate, TotalAmountOC = View.TotalAmountOc, TotalAmountExchange = View.TotalAmountExchange, JournalMemo = View.JournalMemo, DocumentInclude = View.DocumentInclude, Trader = View.Trader, BankId = View.BankId, FixedAssetDecrementDetailParallels = View.FixedAssetDecrementDetailParallels }; return(View.RefId == 0 ? Model.AddFixedAssetDecrement(fixedAssetDecrement, isAutoGenerateParallel) : Model.UpdateFixedAssetDecrement(fixedAssetDecrement, isAutoGenerateParallel)); }
internal static FADecrementEntity ToDataTransferObject(FixedAssetDecrementModel model) { return(model == null ? null : AutoMapper.Mapper.Map <FixedAssetDecrementModel, FADecrementEntity>(model)); }