public AstroObjectByName(string AstroObjectName) { strErrorMsg = ""; SqlConnection myConnection2 = Database.GetConnectionAstroObjects(); try { myConnection2.Open(); SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetAstroObjects", myConnection2); Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter CustParm = new SqlParameter("@pAstroObjectName", SqlDbType.NVarChar); CustParm.Value = AstroObjectName; Cmd2.SelectCommand.Parameters.Add(CustParm); ds = new AstroObjectsDataset(); Cmd2.Fill(ds, ds.Tables[0].TableName); } catch (Exception ex) { throw WWTWebService.RaiseException("GetAstroObjectsByName", "http://WWTWebServices", ex.Message, "2000", "GetAstroObjectsByName", WWTWebService.FaultCode.Client); } finally { if (myConnection2.State == ConnectionState.Open) { myConnection2.Close(); } } }
public AstroObjectsDataset GetAstroObjectsInCatalog(string CatalogName) { AstroObjectServices.AstroObjectDataInCatalog x3 = new AstroObjectServices.AstroObjectDataInCatalog(CatalogName); AstroObjectsDataset dsAstroObjectData = x3.dsAstroObjectData; return(dsAstroObjectData); }
public AstroObjectsDataset GetAstroObjectsByName(string AstroObjectName) { AstroObjectServices.AstroObjectByName x1 = new AstroObjectServices.AstroObjectByName(AstroObjectName); AstroObjectsDataset dsAstroObjectData = x1.dsAstroObjectData; return(dsAstroObjectData); }
public AstroObjectsDataset GetAstroObjectsByRaDec(float Ra, float Dec, float PlusMinusArcSecs) { AstroObjectServices.AstroObjectDataByRaDec x2 = new AstroObjectServices.AstroObjectDataByRaDec(Ra, Dec, PlusMinusArcSecs); AstroObjectsDataset dsAstroObjectData = x2.dsAstroObjectData; return(dsAstroObjectData); }
public AstroObjectDataByRaDec(float Ra, float Dec, float PlusMinusArcSecs) { strErrorMsg = ""; SqlConnection myConnection2 = Database.GetConnectionAstroObjects(); try { myConnection2.Open(); SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetAstroObjects", myConnection2); Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter CustParm = new SqlParameter("@pRa", SqlDbType.Float); CustParm.Value = Ra; Cmd2.SelectCommand.Parameters.Add(CustParm); SqlParameter CustParm2 = new SqlParameter("@pDec", SqlDbType.Float); CustParm2.Value = Dec; Cmd2.SelectCommand.Parameters.Add(CustParm2); SqlParameter CustParm3 = new SqlParameter("@pPlusMinusArcSecs", SqlDbType.Float); CustParm3.Value = PlusMinusArcSecs; Cmd2.SelectCommand.Parameters.Add(CustParm3); ds = new AstroObjectsDataset(); Cmd2.Fill(ds, ds.Tables[0].TableName); } catch (Exception ex) { throw WWTWebService.RaiseException("GetAstroObjectByRADec", "http://WWTWebServices", ex.Message, "2000", "GetAstroObjectByRADec", WWTWebService.FaultCode.Client); } finally { if (myConnection2.State == ConnectionState.Open) myConnection2.Close(); } }
public AstroObjectDataByRaDec(float Ra, float Dec, float PlusMinusArcSecs) { strErrorMsg = ""; SqlConnection myConnection2 = Database.GetConnectionAstroObjects(); try { myConnection2.Open(); SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetAstroObjects", myConnection2); Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter CustParm = new SqlParameter("@pRa", SqlDbType.Float); CustParm.Value = Ra; Cmd2.SelectCommand.Parameters.Add(CustParm); SqlParameter CustParm2 = new SqlParameter("@pDec", SqlDbType.Float); CustParm2.Value = Dec; Cmd2.SelectCommand.Parameters.Add(CustParm2); SqlParameter CustParm3 = new SqlParameter("@pPlusMinusArcSecs", SqlDbType.Float); CustParm3.Value = PlusMinusArcSecs; Cmd2.SelectCommand.Parameters.Add(CustParm3); ds = new AstroObjectsDataset(); Cmd2.Fill(ds, ds.Tables[0].TableName); } catch (Exception ex) { throw WWTWebService.RaiseException("GetAstroObjectByRADec", "http://WWTWebServices", ex.Message, "2000", "GetAstroObjectByRADec", WWTWebService.FaultCode.Client); } finally { if (myConnection2.State == ConnectionState.Open) { myConnection2.Close(); } } }
public AstroObjectByName(string AstroObjectName) { strErrorMsg = ""; SqlConnection myConnection2 = Database.GetConnectionAstroObjects(); try { myConnection2.Open(); SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetAstroObjects", myConnection2); Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter CustParm = new SqlParameter("@pAstroObjectName", SqlDbType.NVarChar); CustParm.Value = AstroObjectName; Cmd2.SelectCommand.Parameters.Add(CustParm); ds = new AstroObjectsDataset(); Cmd2.Fill(ds, ds.Tables[0].TableName); } catch (Exception ex) { throw WWTWebService.RaiseException("GetAstroObjectsByName", "http://WWTWebServices", ex.Message, "2000", "GetAstroObjectsByName", WWTWebService.FaultCode.Client); } finally { if (myConnection2.State == ConnectionState.Open) myConnection2.Close(); } }
internal static TourPlace FromAstroObjectsRow(AstroObjectsDataset.spGetAstroObjectsRow row) { TourPlace newPlace = new TourPlace(); string seperator = ""; string name = ""; if (!row.IsPopularName1Null() && !String.IsNullOrEmpty(row.PopularName1) ) { name = ProperCaps(row.PopularName1); seperator = ";"; } if (!row.IsMessierNameNull() && !String.IsNullOrEmpty(row.MessierName)) { name = name + seperator + row.MessierName; seperator = ";"; } if (!row.IsNGCNameNull() && !String.IsNullOrEmpty(row.NGCName)) { name = name + seperator + row.NGCName; seperator = ";"; } newPlace.name = name; newPlace.Type = ImageSetType.Sky; newPlace.Lat = row.Dec2000; newPlace.Lng = row.Ra2000/15; newPlace.constellation = Constellations.Abbreviation(row.ConstellationName); newPlace.Classification = Classification.Galaxy; //(Classification)Enum.Parse(typeof(Classification), place.Attributes["Classification"].Value); newPlace.magnitude = row.IsVisualMagnitudeNull() ? row.VisualMagnitude : 0; newPlace.AngularSize = 0; // todo fix this newPlace.ZoomLevel = .00009; return newPlace; }