/// <summary>
        /// Deletes the general details by general.
        /// </summary>
        /// <param name="generalDetail">The general detail.</param>
        /// <returns></returns>
        public string DeleteGeneralDetailsByGeneral(GeneralDetailEntity generalDetail)
        {
            const string procedures = @"uspDelete_GeneralDetailVoucher_ByRefID";

            object[] parms = { "@RefID", generalDetail.RefId };
            return(Db.Delete(procedures, true, parms));
        }
 /// <summary>
 /// Takes the specified information.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <returns></returns>
 private object[] Take(GeneralDetailEntity info)
 {
     return(new object[]
     {
         "@RefDetailID", info.RefDetailId,
         "@AccountNumber", info.AccountNumber,
         "@CorrespondingAccountNumber", info.CorrespondingAccountNumber,
         "@Description", info.Description,
         "@AmountOC", info.AmountOc,
         "@AmountExchange", info.AmountExchange,
         "@VoucherTypeID", info.VoucherTypeId,
         "@BudgetSourceCode", info.BudgetSourceCode,
         "@BudgetItemCode", info.BudgetItemCode,
         "@AccountingObjectID", info.AccountingObjectId,
         "@RefID", info.RefId,
         "@VendorID", info.VendorId,
         "@ProjectID", info.ProjectId,
         "@CurrencyCode", info.CurrencyCode,
         "@DepartmentID", info.DepartmentId,
         "@CustomerID", info.CustomerId,
         "@EmployeeID", info.EmployeeId,
         "@ExchangeRate", info.ExchangeRate,
         "@BankID", info.BankId,
         "@InventoryItemID", info.InventoryItemId,
         "@AutoBusiness", info.AutoBusiness
     });
 }
 internal static GeneralDetailModel FromDataTransferObject(GeneralDetailEntity entity)
 {
     return(entity == null ? null : AutoMapper.Mapper.Map <GeneralDetailEntity, GeneralDetailModel>(entity));
 }
        /// <summary>
        /// Inserts the general detail.
        /// </summary>
        /// <param name="generalDetail">The general detail.</param>
        /// <returns></returns>
        public int InsertGeneralDetail(GeneralDetailEntity generalDetail)
        {
            const string procedures = @"uspInsert_GeneralDetailVoucher";

            return(Db.Insert(procedures, true, Take(generalDetail)));
        }