public List <BADepositDetailTaxEntity> BADepositDetailTaxes(List <BADepositDetailTax> details, string refid)
        {
            List <BADepositDetailTaxEntity> lstDetailEntities = new List <BADepositDetailTaxEntity>();

            foreach (var result in details)
            {
                var newresult = new BADepositDetailTaxEntity();
                newresult.RefDetailId             = result.RefDetailID.ToString();
                newresult.RefId                   = refid;
                newresult.Description             = result.Description;
                newresult.VATAmount               = result.VATAmount;
                newresult.VATRate                 = result.VATRate;
                newresult.TurnOver                = result.TurnOver;
                newresult.InvType                 = result.InvType;
                newresult.InvDate                 = result.InvDate;
                newresult.InvSeries               = result.InvSeries;
                newresult.InvNo                   = result.InvNo;
                newresult.PurchasePurposeId       = result.PurchasePurposeID.ToString();
                newresult.AccountingObjectId      = result.AccountingObjectID.ToString();
                newresult.AccountingObjectName    = result.AccountingObjectName;
                newresult.AccountingObjectAddress = result.AccountingObjectAddress;
                newresult.CompanyTaxCode          = result.CompanyTaxCode;
                newresult.SortOrder               = result.SortOrder;
                newresult.InvoiceTypeCode         = result.InvoiceTypeCode;
                lstDetailEntities.Add(newresult);
            }
            return(lstDetailEntities);
        }
Example #2
0
 /// <summary>
 ///     Takes the specified bADeposit.
 /// </summary>
 /// <param name="bADepositDetailTaxEntity">The b a deposit detail sale entity.</param>
 /// <returns></returns>
 private static object[] Take(BADepositDetailTaxEntity bADepositDetailTaxEntity)
 {
     return(new object[]
     {
         "@RefDetailID", bADepositDetailTaxEntity.RefDetailId,
         "@RefID", bADepositDetailTaxEntity.RefId,
         "@Description", bADepositDetailTaxEntity.Description,
         "@VATAmount", bADepositDetailTaxEntity.VATAmount,
         "@VATRate", bADepositDetailTaxEntity.VATRate,
         "@TurnOver", bADepositDetailTaxEntity.TurnOver,
         "@InvType", bADepositDetailTaxEntity.InvType,
         "@InvDate", bADepositDetailTaxEntity.InvDate,
         "@InvSeries", bADepositDetailTaxEntity.InvSeries,
         "@InvNo", bADepositDetailTaxEntity.InvNo,
         "@PurchasePurposeID", bADepositDetailTaxEntity.PurchasePurposeId,
         "@AccountingObjectID", bADepositDetailTaxEntity.AccountingObjectId,
         "@AccountingObjectName", bADepositDetailTaxEntity.AccountingObjectName,
         "@AccountingObjectAddress", bADepositDetailTaxEntity.AccountingObjectAddress,
         "@CompanyTaxCode", bADepositDetailTaxEntity.CompanyTaxCode,
         "@SortOrder", bADepositDetailTaxEntity.SortOrder,
         "@InvoiceTypeCode", bADepositDetailTaxEntity.InvoiceTypeCode
     });
 }
Example #3
0
        /// <summary>
        ///     Inserts the bADeposit detail.
        /// </summary>
        /// <param name="bADepositDetailTax">The bADeposit detail.</param>
        /// <returns></returns>
        public string InsertBADepositDetailTax(BADepositDetailTaxEntity bADepositDetailTax)
        {
            const string sql = @"uspInsert_BADepositDetailTax";

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