/// <summary> /// Saves the specified <see cref="FiftyMeterPointSurvey"/> object. /// </summary> /// <param name="survey">The FiftyMeterPointSurvey object to save.</param> private static void save(FiftyMeterPointSurvey survey) { List <QueryParameter> queryList = EventBaseMapper.CreateSaveParameters(survey); queryList.AddRange(new List <QueryParameter>() { new QueryParameter("NoiseCode", survey.NoiseCode), new QueryParameter("SiteVisitId", survey.SiteVisitId) }); BaseMapper.SaveObject(survey, queryList, TABLE_NAME); }
private static void save(Species species) { BaseMapper.SaveObject(species, new List <QueryParameter>() { new QueryParameter("AlphaCode", species.AlphaCode), new QueryParameter("CommonName", species.CommonName), new QueryParameter("ScientificName", species.ScientificName), new QueryParameter("Id", species.Id), new QueryParameter("WarningCount", species.WarningCount), }); }
private static void saveSamplingPoint(SamplingPoint point) { List <QueryParameter> parmList = new List <QueryParameter>() { new QueryParameter("Id", point.Id), new QueryParameter("Longitude", point.GeoCoordinate.Longitude.Value), new QueryParameter("Latitude", point.GeoCoordinate.Latitude.Value), new QueryParameter("LocationName", point.Name), new QueryParameter("ParentLocationId", point.SiteId) }; BaseMapper.SaveObject(point, parmList); }
/// <summary> /// Saves the specified site. /// </summary> /// <param name="site">The site.</param> private static void save(Site site) { List <QueryParameter> queryList = new List <QueryParameter>() { new QueryParameter("CodeName", site.CodeName), new QueryParameter("Latitude", site.GeoCoordinate.Latitude.Value), new QueryParameter("Longitude", site.GeoCoordinate.Longitude.Value), new QueryParameter("Id", site.Id), new QueryParameter("LocationName", site.Name) }; BaseMapper.SaveObject(site, queryList); }
/// <summary> /// Saves the specified <see cref="SiteCondition"/> object. /// </summary> /// <param name="conditions">The SiteConditions object to save.</param> private static void save(SiteCondition conditions) { List <QueryParameter> queryList = new List <QueryParameter>() { new QueryParameter("Id", conditions.Id), new QueryParameter("Scale", conditions.Temperature.Units), new QueryParameter("SiteVisitId", conditions.SiteVisitId), new QueryParameter("Sky", conditions.Sky), new QueryParameter("Temperature", conditions.Temperature.Value), new QueryParameter("Wind", conditions.Wind) }; BaseMapper.SaveObject(conditions, queryList); }
/// <summary> /// Saves the specified <see cref="SiteCondition"/> object. /// </summary> /// <param name="visit">The SiteConditions object to save.</param> private static void save(SiteVisit visit) { List <QueryParameter> queryList = EventBaseMapper.CreateSaveParameters(visit); queryList.AddRange(new List <QueryParameter>() { new QueryParameter("ObserverId", visit.ObserverId), new QueryParameter("RecorderId", visit.RecorderId), new QueryParameter("StartConditionId", visit.StartConditions.Id), new QueryParameter("EndConditionId", visit.EndConditions.Id), new QueryParameter("Comments", visit.Comments), new QueryParameter("IsDataEntryComplete", visit.IsDataEntryComplete), }); BaseMapper.SaveObject(visit, queryList); }
private static void save(Person person) { BaseMapper.SaveObject(person, new List <QueryParameter>() { new QueryParameter("EmailAddress", person.EmailAddress), new QueryParameter("FirstName", person.FirstName), new QueryParameter("LastName", person.LastName), new QueryParameter("Id", person.Id), new QueryParameter("OpenId", person.OpenId), new QueryParameter("PhoneNumber", person.PhoneNumber), new QueryParameter("Address1", person.Address1), new QueryParameter("Address2", person.Address2), new QueryParameter("City", person.City), new QueryParameter("State", person.State), new QueryParameter("ZipCode", person.ZipCode), new QueryParameter("Country", person.Country), new QueryParameter("HasBeenTrained", person.HasBeenTrained), new QueryParameter("HasClipboard", person.HasClipboard), new QueryParameter("PersonStatus", (short)Enum.Parse(typeof(Status), person.PersonStatus.ToString())), new QueryParameter("PersonRole", (short)Enum.Parse(typeof(Role), person.PersonRole.ToString())) }); }