internal OIlstMatchDetails GetCompanyMatchDetails(int InputId, int UserId, bool ApplyFilter, string MatchIds = null) { OIlstMatchDetails oIlstMatchDetails = new OIlstMatchDetails(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "oi.StewGetCompanyMatchDetails"; StoredProceduresParameterEntity param = new StoredProceduresParameterEntity(); sproc.StoredProceduresParameter.Add(GetParam("@InputId", InputId.ToString(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@MatchIds", string.IsNullOrEmpty(MatchIds) ? null : MatchIds.ToString(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ApplyFilter", ApplyFilter.ToString(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@UserId", UserId.ToString(), SQLServerDatatype.IntDataType)); DataSet ds; ds = sql.ExecuteDataSet(CommandType.StoredProcedure, sproc, "", DBIntent.ReadWrite.ToString()); if (ds != null) { if (ds.Tables[0] != null && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0) { OICompanyAdapter ta = new OICompanyAdapter(); foreach (DataRow rw in ds.Tables[0].Rows) { oIlstMatchDetails.lstOICompanyInput = ta.AdaptItem(rw); } } if (ds.Tables[1] != null && ds.Tables[1].Rows != null && ds.Tables[1].Rows.Count > 0) { oIlstMatchDetails.lstOISearchMatch = new OICompanyAdapter().SearchMatchAdapt(ds.Tables[1]); } if (ds.Tables[2] != null && ds.Tables[2].Rows != null && ds.Tables[2].Rows.Count > 0) { oIlstMatchDetails.lstOIMatchDetail = new OICompanyAdapter().OICompanyMatchDetailsAdapt(ds.Tables[2]); } } return(oIlstMatchDetails); } catch (Exception) { //Put log to db here throw; } }
internal OIlstMatchMetaDetails GetStewOIMatchMetadata(int inputId, string OrbNum) { OIlstMatchMetaDetails oIlstMatchDetails = new OIlstMatchMetaDetails(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "oi.StewGetMatchMetadata"; StoredProceduresParameterEntity param = new StoredProceduresParameterEntity(); sproc.StoredProceduresParameter.Add(GetParam("@InputId", inputId.ToString(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@OrbNum", OrbNum.ToString(), SQLServerDatatype.VarcharDataType)); DataSet ds; ds = sql.ExecuteDataSet(CommandType.StoredProcedure, sproc, "", DBIntent.Read.ToString()); if (ds != null) { if (ds.Tables[0] != null && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0) { OICompanyAdapter ta = new OICompanyAdapter(); foreach (DataRow rw in ds.Tables[0].Rows) { oIlstMatchDetails.lstOICompanyInput = ta.AdaptItem(rw); } } if (ds.Tables[1] != null && ds.Tables[1].Rows != null && ds.Tables[1].Rows.Count > 0) { oIlstMatchDetails.lstMatchQualityMetadatas = new OICompanyAdapter().SearchMatchMetaDataAdapt(ds.Tables[1]); } if (ds.Tables[2] != null && ds.Tables[2].Rows != null && ds.Tables[2].Rows.Count > 0) { oIlstMatchDetails.lstMatchMetaDatas = new OICompanyAdapter().MatchMetaDataDetailAdapt(ds.Tables[2]); } } return(oIlstMatchDetails); } catch (Exception) { //Put log to db here throw; } }