/// <summary>
        /// Deletes the capital allocate.
        /// </summary>
        /// <param name="capitalAllocate">The capital allocate.</param>
        /// <returns>System.String.</returns>
        public string DeleteCapitalAllocate(CapitalAllocateEntity capitalAllocate)
        {
            const string sql = @"uspDelete_CapitalAllocate";

            object[] parms = { "@CapitalAllocateID", capitalAllocate.CapitalAllocateId };
            return(Db.Delete(sql, true, parms));
        }
 /// <summary>
 /// Takes the specified CapitalAllocate.
 /// </summary>
 /// <param name="capitalAllocate">The CapitalAllocate.</param>
 /// <returns>System.Object[][].</returns>
 private object[] Take(CapitalAllocateEntity capitalAllocate)
 {
     return(new object[]
     {
         "@CapitalAllocateID", capitalAllocate.CapitalAllocateId,
         "@BudgetItemCode", capitalAllocate.BudgetItemCode,
         "@BudgetSourceCode", capitalAllocate.BudgetSourceCode,
         "@ActivityID", capitalAllocate.Activityid,
         "@AllocatePercent", capitalAllocate.AllocatePercent,
         "@AllocateType", capitalAllocate.AllocateType,
         "@DeterminedDate", capitalAllocate.DeterminedDate,
         "@CapitalAccountCode", capitalAllocate.CapitalAccountCode,
         "@RevenueAccountCode", capitalAllocate.RevenueAccountCode,
         "@ExpenseAccountCode", capitalAllocate.ExpenseAccountCode,
         "@Description", capitalAllocate.Description,
         "@IsActive", capitalAllocate.IsActive,
         "@WaitBudgetSourceCode", capitalAllocate.WaitBudgetSourceCode,
         "@CapitalAllocateCode", capitalAllocate.CapitalAllocateCode,
         "@FromDate", capitalAllocate.FromDate,
         "@ToDate", capitalAllocate.ToDate,
     });
 }
        /// <summary>
        /// Updates the capital allocate.
        /// </summary>
        /// <param name="capitalAllocate">The capital allocate.</param>
        /// <returns>System.String.</returns>
        public string UpdateCapitalAllocate(CapitalAllocateEntity capitalAllocate)
        {
            const string sql = "uspUpdate_CapitalAllocate";

            return(Db.Update(sql, true, Take(capitalAllocate)));
        }
        /// <summary>
        /// Inserts the capital allocate.
        /// </summary>
        /// <param name="capitalAllocate">The capital allocate.</param>
        /// <returns>System.Int32.</returns>
        public int InsertCapitalAllocate(CapitalAllocateEntity capitalAllocate)
        {
            const string sql = "uspInsert_CapitalAllocate";

            return(Db.Insert(sql, true, Take(capitalAllocate)));
        }