/// <summary> /// Takes the specified captital allocate voucher. /// </summary> /// <param name="captitalAllocateVoucher">The captital allocate voucher.</param> /// <returns>System.Object[].</returns> private object[] Take(CaptitalAllocateVoucherEntity captitalAllocateVoucher) { return(new object[] { "@RefDetailID", captitalAllocateVoucher.RefDetailId, "@BudgetItemCode", captitalAllocateVoucher.BudgetItemCode, "@BudgetSourceCode", captitalAllocateVoucher.BudgetSourceCode, "@ActivityID", captitalAllocateVoucher.ActivityId, "@AllocatePercent", captitalAllocateVoucher.AllocatePercent, "@AllocateType", captitalAllocateVoucher.AllocateType, "@DeterminedDate", captitalAllocateVoucher.FromDate, "@CapitalAccountCode", captitalAllocateVoucher.CapitalAccountCode, "@RevenueAccountCode", captitalAllocateVoucher.RevenueAccountCode, "@ExpenseAccountCode", captitalAllocateVoucher.ExpenseAccountCode, "@Description", captitalAllocateVoucher.Description, "@IsActive", captitalAllocateVoucher.IsActive, "@WaitBudgetSourceCode", captitalAllocateVoucher.WaitBudgetSourceCode, "@CapitalAllocateCode", captitalAllocateVoucher.CapitalAllocateCode, "@Amount", captitalAllocateVoucher.Amount, "@TotalAmount", captitalAllocateVoucher.TotalAmount, "@ExpenseAmount", captitalAllocateVoucher.ExpenseAmount, "@Todate", captitalAllocateVoucher.ToDate, "@FromDate", captitalAllocateVoucher.FromDate, "@CurrencyCode", captitalAllocateVoucher.CurrencyCode, "@RefID", captitalAllocateVoucher.RefId, "@BudgetSourceName", captitalAllocateVoucher.BudgetSourceName, "@ExchangeRate", captitalAllocateVoucher.AsDecimal() }); }
/// <summary> /// Inserts the captital allocate voucher. /// </summary> /// <param name="captitalAllocateVoucher">The captital allocate voucher.</param> /// <returns>System.Int32.</returns> public int InsertCaptitalAllocateVoucher(CaptitalAllocateVoucherEntity captitalAllocateVoucher) { const string procedures = @"uspInsert_CaptitalAllocateVoucher"; return(Db.Insert(procedures, true, Take(captitalAllocateVoucher))); }