Пример #1
0
        public List <BAWithdrawDetailTaxEntity> BAWithdrawDetailTaxs(List <BAWithdrawDetailTax> details, string refid)
        {
            List <BAWithdrawDetailTaxEntity> lstDetailEntities = new List <BAWithdrawDetailTaxEntity>();

            foreach (var result in details)
            {
                var newresult = new BAWithdrawDetailTaxEntity();
                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.CompanyTaxCode     = result.CompanyTaxCode;
                newresult.SortOrder          = result.SortOrder ?? 0;
                newresult.InvoiceTypeCode    = result.InvoiceTypeCode;
                lstDetailEntities.Add(newresult);
            }
            return(lstDetailEntities);
        }
 /// <summary>
 ///     Takes the specified bADeposit.
 /// </summary>
 /// <param name="bAWithdrawDetailTaxEntity">The b a with draw detail purchase entity.</param>
 /// <returns></returns>
 private object[] Take(BAWithdrawDetailTaxEntity bAWithdrawDetailTaxEntity)
 {
     return(new object[]
     {
         "@RefDetailID", bAWithdrawDetailTaxEntity.RefDetailId,
         "@RefID", bAWithdrawDetailTaxEntity.RefId,
         "@Description", bAWithdrawDetailTaxEntity.Description,
         "@VATAmount", bAWithdrawDetailTaxEntity.VATAmount,
         "@VATRate", bAWithdrawDetailTaxEntity.VATRate,
         "@TurnOver", bAWithdrawDetailTaxEntity.TurnOver,
         "@InvType", bAWithdrawDetailTaxEntity.InvType,
         "@InvDate", bAWithdrawDetailTaxEntity.InvDate,
         "@InvSeries", bAWithdrawDetailTaxEntity.InvSeries,
         "@InvNo", bAWithdrawDetailTaxEntity.InvNo,
         "@PurchasePurposeID", bAWithdrawDetailTaxEntity.PurchasePurposeId,
         "@AccountingObjectID", bAWithdrawDetailTaxEntity.AccountingObjectId,
         "@CompanyTaxCode", bAWithdrawDetailTaxEntity.CompanyTaxCode,
         "@SortOrder", bAWithdrawDetailTaxEntity.SortOrder,
         "@InvoiceTypeCode", bAWithdrawDetailTaxEntity.InvoiceTypeCode
     });
 }
        /// <summary>
        ///     Inserts the bADeposit detail.
        /// </summary>
        /// <param name="bAWithdrawDetailTax">The bADeposit detail.</param>
        /// <returns></returns>
        public string InsertBAWithdrawDetailTaxEntity(BAWithdrawDetailTaxEntity bAWithdrawDetailTax)
        {
            const string sql = @"uspInsert_BAWithdrawDetailTax";

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