Example #1
0
        public List <CAPaymentDetailTaxEntity> CAPaymentDetailTaxes(List <CAPaymentDetailTax> details, string refid)
        {
            List <CAPaymentDetailTaxEntity> lstDetailEntities = new List <CAPaymentDetailTaxEntity>();

            foreach (var result in details)
            {
                var newresult = new CAPaymentDetailTaxEntity();
                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);
        }
 private static object[] Take(CAPaymentDetailTaxEntity cAPaymentDetailTaxEntity)
 {
     return(new object[]
     {
         "@RefDetailID", cAPaymentDetailTaxEntity.RefDetailId,
         "@RefID", cAPaymentDetailTaxEntity.RefId,
         "@Description", cAPaymentDetailTaxEntity.Description,
         "@VATAmount", cAPaymentDetailTaxEntity.VATAmount,
         "@VATRate", cAPaymentDetailTaxEntity.VATRate,
         "@TurnOver", cAPaymentDetailTaxEntity.TurnOver,
         "@InvType", cAPaymentDetailTaxEntity.InvType,
         "@InvDate", cAPaymentDetailTaxEntity.InvDate,
         "@InvSeries", cAPaymentDetailTaxEntity.InvSeries,
         "@InvNo", cAPaymentDetailTaxEntity.InvNo,
         "@PurchasePurposeID", cAPaymentDetailTaxEntity.PurchasePurposeId,
         "@AccountingObjectID", cAPaymentDetailTaxEntity.AccountingObjectId,
         "@CompanyTaxCode", cAPaymentDetailTaxEntity.CompanyTaxCode,
         "@SortOrder", cAPaymentDetailTaxEntity.SortOrder,
         "@InvoiceTypeCode", cAPaymentDetailTaxEntity.InvoiceTypeCode,
     });
 }
 public string UpdateCAPaymentDetailTax(CAPaymentDetailTaxEntity paymentDetailTaxEntity)
 {
     return(null);
 }
        public string InsertCAPaymentDetailTax(CAPaymentDetailTaxEntity paymentDetailTaxEntity)
        {
            const string procedures = @"uspInsert_CAPaymentDetailTax";

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