Beispiel #1
0
        public List <GLVoucherDetailTaxEntity> GLVoucherDetailTaxes(List <GLVoucherDetailTax> details, string refid)
        {
            List <GLVoucherDetailTaxEntity> lstDetailEntities = new List <GLVoucherDetailTaxEntity>();

            foreach (var result in details)
            {
                var newresult = new GLVoucherDetailTaxEntity();
                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);
        }
 /// <summary>
 /// Takes the specified f a depreciation detail entity.
 /// </summary>
 /// <param name="glVoucherDetailTaxEntity">The f a depreciation detail entity.</param>
 /// <returns></returns>
 private static object[] Take(GLVoucherDetailTaxEntity glVoucherDetailTaxEntity)
 {
     return(new object[]
     {
         "@RefDetailID", glVoucherDetailTaxEntity.RefDetailId,
         "@RefID", glVoucherDetailTaxEntity.RefId,
         "@Description", glVoucherDetailTaxEntity.Description,
         "@VATAmount", glVoucherDetailTaxEntity.VATAmount,
         "@VATRate", glVoucherDetailTaxEntity.VATRate,
         "@TurnOver", glVoucherDetailTaxEntity.TurnOver,
         "@InvType", glVoucherDetailTaxEntity.InvType,
         "@InvDate", glVoucherDetailTaxEntity.InvDate,
         "@InvSeries", glVoucherDetailTaxEntity.InvSeries,
         "@InvNo", glVoucherDetailTaxEntity.InvNo,
         "@PurchasePurposeID", glVoucherDetailTaxEntity.PurchasePurposeId,
         "@AccountingObjectID", glVoucherDetailTaxEntity.AccountingObjectId,
         "@AccountingObjectName", glVoucherDetailTaxEntity.AccountingObjectName,
         "@AccountingObjectAddress", glVoucherDetailTaxEntity.AccountingObjectAddress,
         "@CompanyTaxCode", glVoucherDetailTaxEntity.CompanyTaxCode,
         "@SortOrder", glVoucherDetailTaxEntity.SortOrder,
         "@InvoiceTypeCode", glVoucherDetailTaxEntity.InvoiceTypeCode
     });
 }
        /// <summary>
        /// Inserts the fa armortization detail.
        /// </summary>
        /// <param name="glVoucherDetailTax">The gl voucher detail tax.</param>
        /// <returns></returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public string InsertGLVoucherDetailTax(GLVoucherDetailTaxEntity glVoucherDetailTax)
        {
            const string sql = @"uspInsert_GLVoucherDetailTax";

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