예제 #1
0
 /// <summary>
 /// GetCurrentAtDate
 /// Calls [usp_select_CurrencyRate_Current_at_Date]
 /// </summary>
 public static CurrencyRate GetCurrentAtDate(System.Int32?currencyNo, System.DateTime?datePoint)
 {
     Rebound.GlobalTrader.DAL.CurrencyRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CurrencyRate.GetCurrentAtDate(currencyNo, datePoint);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CurrencyRate obj = new CurrencyRate();
         obj.ExchangeRate = objDetails.ExchangeRate;
         objDetails       = null;
         return(obj);
     }
 }
예제 #2
0
        //[001] code start
        #endregion

        /// <summary>
        /// Returns a new CurrencyRateDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CurrencyRateDetails GetCurrencyRateFromReader(DbDataReader reader)
        {
            CurrencyRateDetails currencyRate = new CurrencyRateDetails();

            if (reader.HasRows)
            {
                currencyRate.CurrencyRateId    = GetReaderValue_Int32(reader, "CurrencyRateId", 0);                  //From: [Table]
                currencyRate.CurrencyNo        = GetReaderValue_Int32(reader, "CurrencyNo", 0);                      //From: [usp_selectAll_Allocation_for_CustomerRMALine]
                currencyRate.CurrencyDate      = GetReaderValue_DateTime(reader, "CurrencyDate", DateTime.MinValue); //From: [Table]
                currencyRate.ExchangeRate      = GetReaderValue_Double(reader, "ExchangeRate", 0);                   //From: [Table]
                currencyRate.UpdatedBy         = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);            //From: [Table]
                currencyRate.DLUP              = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);         //From: [Table]
                currencyRate.RepriceOpenOrders = GetReaderValue_NullableBoolean(reader, "RepriceOpenOrders", null);  //From: [Table]
                currencyRate.CurrencyCode      = GetReaderValue_String(reader, "CurrencyCode", "");                  //From: [usp_list_Activity_by_Client_with_filter]
            }
            return(currencyRate);
        }
예제 #3
0
 /// <summary>
 /// Get
 /// Calls [usp_select_CurrencyRate]
 /// </summary>
 public static CurrencyRate Get(System.Int32?currencyRateId)
 {
     Rebound.GlobalTrader.DAL.CurrencyRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CurrencyRate.Get(currencyRateId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CurrencyRate obj = new CurrencyRate();
         obj.CurrencyRateId    = objDetails.CurrencyRateId;
         obj.CurrencyNo        = objDetails.CurrencyNo;
         obj.CurrencyDate      = objDetails.CurrencyDate;
         obj.ExchangeRate      = objDetails.ExchangeRate;
         obj.RepriceOpenOrders = objDetails.RepriceOpenOrders;
         obj.UpdatedBy         = objDetails.UpdatedBy;
         obj.DLUP   = objDetails.DLUP;
         objDetails = null;
         return(obj);
     }
 }