protected override void GetDetailText(BioLinkDataObject model, TextTableBuilder builder) { var refmodel = model as Reference; builder.Add("Type", refmodel.RefType); builder.Add("Title", RTFUtils.StripMarkup(refmodel.Title)); builder.Add("Author", refmodel.Author); builder.Add("Year", refmodel.YearOfPub); builder.Add("Journal", refmodel.JournalName); }
protected override void GetDetailText(BioLinkDataObject model, TextTableBuilder builder) { var loan = model as Loan; builder.Add("Loan number", loan.LoanNumber); builder.Add("Permit number", loan.PermitNumber); builder.Add("Date initiated", loan.DateInitiated); builder.Add("Date due", loan.DateDue); builder.AddFormat("Requested by", LoanService.FormatName(loan.RequestorTitle, loan.RequestorGivenName, loan.RequestorName)); builder.AddFormat("Received by", LoanService.FormatName(loan.ReceiverTitle, loan.RequestorGivenName, loan.ReceiverName)); builder.AddFormat("Authorized by", LoanService.FormatName(loan.OriginatorTitle, loan.OriginatorGivenName, loan.OriginatorName)); builder.AddFormat("Status", (ViewModel as LoanViewModel).Status); }
protected override void GetDetailText(Data.Model.BioLinkDataObject model, TextTableBuilder builder) { var vm = ViewModel as LayerViewModel; if (vm != null) { var m = vm.Model as VectorLayer; if (m != null) { builder.Add("Layer type", "Vector"); builder.Add("Filename", m.DataSource.ConnectionID); } } }
protected override void GetDetailText(Data.Model.BioLinkDataObject model, TextTableBuilder builder) { var vm = ViewModel as LayerViewModel; if (vm != null) { var m = vm.Model as GdalRasterLayer; if (m != null) { builder.Add("Layer type", "Raster"); builder.Add("Filename", m.Filename); } } }
protected override void GetDetailText(BioLinkDataObject model, TextTableBuilder builder) { var item = ViewModel as LabelSetItemViewModel; if (item != null) { builder.Add("Position", GeoUtils.FormatCoordinates(item.Lat, item.Long)); builder.Add("Position2", GeoUtils.FormatCoordinates(item.Lat2, item.Long2)); builder.Add("Copies", item.NumCopies); builder.Add("Print order", item.PrintOrder); builder.Add("Taxon", item.TaxaFullName); builder.Add("SiteID", item.SiteID); builder.Add("SiteVisitID", item.VisitID); builder.Add("MaterialID", item.MaterialID); } }
protected override void GetDetailText(BioLinkDataObject model, TextTableBuilder builder) { var viewModel = ViewModel as ContactViewModel; builder.Add("Job title", viewModel.JobTitle); builder.Add("E-mail", viewModel.EMail); builder.Add("Work phone", viewModel.WorkPh); builder.Add("Work Fax", viewModel.WorkFax); builder.Add("Home phone", viewModel.HomePh); builder.Add("Institution", viewModel.Institution); builder.Add("Street Address", viewModel.StreetAddress); if (viewModel.StreetAddress == null || !viewModel.StreetAddress.Equals(viewModel.PostalAddress, StringComparison.CurrentCultureIgnoreCase)) { builder.Add("Postal Address", viewModel.PostalAddress); } }
protected override void GetDetailText(BioLinkDataObject model, TextTableBuilder builder) { if (model != null) { switch (ElemType) { case "Site": var site = model as Site; builder.Add("Political Region", site.PoliticalRegion); if (site.PosY1.HasValue && site.PosX1.HasValue) { builder.Add("Position", string.Format("{0} {1}", GeoUtils.DecDegToDMS(site.PosX1.Value, CoordinateType.Longitude), GeoUtils.DecDegToDMS(site.PosY1.Value, CoordinateType.Latitude))); } else { builder.Add("Position", "No position recorded."); } break; case "SiteVisit": var visit = model as SiteVisit; builder.Add("Collector(s)", visit.Collector); builder.AddFormat("Start Date", "{0}", DateUtils.BLDateToStr(visit.DateStart, "Not specified")); builder.AddFormat("End Date", "{0}", DateUtils.BLDateToStr(visit.DateEnd, "Not specified")); builder.Add("Site", visit.SiteName); break; case "Material": var mat = model as Data.Model.Material; builder.Add("Site", mat.SiteName); builder.Add("Site Visit", mat.SiteVisitName); builder.Add("Accession No.", mat.AccessionNumber); builder.Add("Registration No.", mat.RegistrationNumber); builder.Add("Identification", mat.TaxaDesc); break; case "Region": var reg = model as Region; if (string.IsNullOrWhiteSpace(reg.Rank)) { builder.Add("Region type", "Not specified"); } else { builder.Add("Region type", reg.Rank); } break; case "Trap": var trap = model as Trap; builder.Add("Site", trap.SiteName); builder.Add("Trap type", trap.TrapType); builder.Add("Description", trap.Description); break; } } }