Exemplo n.º 1
0
        //[001] code end

        #endregion

        /// <summary>
        /// Returns a new TaxDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual GlobalTaxDetails GetTaxFromReader(DbDataReader reader)
        {
            GlobalTaxDetails tax = new GlobalTaxDetails();

            if (reader.HasRows)
            {
                tax.TaxId      = GetReaderValue_Int32(reader, "TaxId", 0);                   //From: [Table]
                tax.TaxName    = GetReaderValue_String(reader, "TaxName", "");               //From: [usp_select_Country]
                tax.ClientNo   = GetReaderValue_Int32(reader, "ClientNo", 0);                //From: [Table]
                tax.Notes      = GetReaderValue_String(reader, "Notes", "");                 //From: [usp_select_Address_DefaultBilling_for_Company]
                tax.Inactive   = GetReaderValue_Boolean(reader, "Inactive", false);          //From: [Table]
                tax.UpdatedBy  = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);    //From: [Table]
                tax.DLUP       = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue); //From: [Table]
                tax.TaxCode    = GetReaderValue_String(reader, "TaxCode", "");               //From: [Table]
                tax.PrintNotes = GetReaderValue_String(reader, "PrintNotes", "");            //From: [usp_select_Invoice_for_Print]
            }
            return(tax);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_Tax]
 /// </summary>
 public static GlobalTax Get(System.Int32?taxId)
 {
     Rebound.GlobalTrader.DAL.GlobalTaxDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.GlobalTax.Get(taxId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         GlobalTax obj = new GlobalTax();
         obj.TaxId      = objDetails.TaxId;
         obj.TaxName    = objDetails.TaxName;
         obj.ClientNo   = objDetails.ClientNo;
         obj.Notes      = objDetails.Notes;
         obj.Inactive   = objDetails.Inactive;
         obj.TaxCode    = objDetails.TaxCode;
         obj.PrintNotes = objDetails.PrintNotes;
         obj.UpdatedBy  = objDetails.UpdatedBy;
         obj.DLUP       = objDetails.DLUP;
         objDetails     = null;
         return(obj);
     }
 }