public virtual PointSensitivityBuilder rateSensitivity(OvernightCompoundedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider) { OvernightIndexRates rates = provider.overnightIndexRates(computation.Index); ObservationDetails details = new ObservationDetails(computation, rates); return(details.calculateRateSensitivity()); }
public virtual PointSensitivityBuilder rateSensitivity(OvernightAveragedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider) { OvernightIndexRates rates = provider.overnightIndexRates(computation.Index); LocalDate valuationDate = rates.ValuationDate; LocalDate startFixingDate = computation.StartDate; LocalDate startPublicationDate = computation.calculatePublicationFromFixing(startFixingDate); // No fixing to analyze. Go directly to approximation and cut-off. if (valuationDate.isBefore(startPublicationDate)) { return(rateForwardSensitivity(computation, rates)); } ObservationDetails details = new ObservationDetails(computation, rates); return(details.calculateRateSensitivity()); }
public List <HistoryDetails> GetHistory(string mobileNumber, string CPno) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("@mobileNumber", mobileNumber); sqlparam[1] = new SqlParameter("@CPno", CPno); DataSet ds = CommonFunction.GetDataSet("USP_Get_HistoryByMobile_App", sqlparam, ""); List <HistoryDetails> HD = new List <HistoryDetails>(); List <ObservationDetails> OD = new List <ObservationDetails>(); List <TestDetails> TD = new List <TestDetails>(); List <MedicinesDetails> MD = new List <MedicinesDetails>(); List <HistoryFile> HF = new List <HistoryFile>(); //History if (ds != null && ds.Tables[0].Rows.Count > 0) { DataTable dt1 = ds.Tables[0]; foreach (DataRow dr in dt1.Rows) { HistoryDetails histrydetails = new HistoryDetails(); // HistoryDetails lstHD = new HistoryDetails(); CommonFunction.ReflectSingleData(histrydetails, dr); if (ds != null && ds.Tables[0].Rows.Count > 0) { DataTable dt0 = ds.Tables[0]; foreach (DataRow dr0 in dt0.Rows) { if (Convert.ToInt32(dr0["QueueId"]) == histrydetails.QueueId) { HistoryDetails lstHD = new HistoryDetails(); CommonFunction.ReflectSingleData(lstHD, dr0); histrydetails.lstHD.Add(lstHD); } } } //Observation if (ds != null && ds.Tables[1].Rows.Count > 0) { DataTable dt2 = ds.Tables[1]; foreach (DataRow dr1 in dt2.Rows) { if (Convert.ToInt32(dr1["QueueId"]) == histrydetails.QueueId) { ObservationDetails lstOD = new ObservationDetails(); CommonFunction.ReflectSingleData(lstOD, dr1); histrydetails.lstOD.Add(lstOD); } } } //Test if (ds != null && ds.Tables[2].Rows.Count > 0) { DataTable dt3 = ds.Tables[2]; foreach (DataRow dr2 in dt3.Rows) { if (Convert.ToInt32(dr2["QueueId"]) == histrydetails.QueueId) { TestDetails lstOD = new TestDetails(); CommonFunction.ReflectSingleData(lstOD, dr2); histrydetails.lstTD.Add(lstOD); } } } //Medicine if (ds != null && ds.Tables[3].Rows.Count > 0) { DataTable dt4 = ds.Tables[3]; foreach (DataRow dr3 in dt4.Rows) { if (Convert.ToInt32(dr3["QueueId"]) == histrydetails.QueueId) { MedicinesDetails lstMD = new MedicinesDetails(); CommonFunction.ReflectSingleData(lstMD, dr3); histrydetails.lstMD.Add(lstMD); } } } // if (ds != null && ds.Tables[4].Rows.Count > 0) { DataTable dt5 = ds.Tables[4]; foreach (DataRow dr4 in dt5.Rows) { if (Convert.ToInt32(dr4["QueueId"]) == histrydetails.QueueId) { HistoryFile lstHF = new HistoryFile(); CommonFunction.ReflectSingleData(lstHF, dr4); histrydetails.lstHF.Add(lstHF); } } } HD.Add(histrydetails); } } // HD.lstOD = OD; //histrydetails.lstHD = HD; //histrydetails.lstOD = OD; //histrydetails.lstTD = TD; //histrydetails.lstMD = MD; return(HD); } catch (Exception Ex) { throw Ex; } }