/// <summary> /// Compare the user entered data against the passed instance for similarity. /// </summary> /// <param name="obj">The object to compare this instance against.</param> /// <returns> /// True if instance matches user data, otherwise False. /// </returns> public override bool IsEquivalentTo(object obj) { var repository = obj as GedcomRepositoryRecord; if (repository == null) { return(false); } if (!Equals(Address, repository.Address)) { return(false); } if (!Equals(ChangeDate, repository.ChangeDate)) { return(false); } if (!Citations.All(repository.Citations.Contains)) { return(false); } if (!Equals(Name, repository.Name)) { return(false); } return(true); }
private void InsertRow() { var item = new MonthText(); Citations = Citations == null ? new ObservableCollection <MonthText>() : Citations; Citations.Add(item); }
public CitationDetails(Citations citation) { InitializeComponent(); name.Text = "Name: " + citation.Name; studentId.Text = "Student ID: " + citation.StudentId.ToString(); vehicleInfo.Text = "Vehicle Information: " + citation.VehicleInfo; lisencePlate.Text = "License Plate: " + citation.LisencePlate; citationId.Text = "Citation ID: " + citation.CitationId.ToString(); reasonForCitation.Text = "Reason for Citation: " + citation.ReasonForCitation; fineAmount.Text = "Fine Amount: " + citation.FineAmount.ToString(); paidStatus.Text = "Paid Status: " + citation.PaidStatus.ToString(); }
private static Citations Parse(StreamReader sr) { Citations citations = new Citations(); // Skip header string line = sr.ReadLine(); while ((line = sr.ReadLine()) != null) { MatchCollection matches = CsvHelper.regex.Matches(line); string layerName = matches[0].Groups[2].Value; if (string.IsNullOrEmpty(layerName)) { continue; } string source = matches[1].Groups[2].Value; if (!string.IsNullOrEmpty(source)) { string key = layerName + "|" + source; if (!citations.map.ContainsKey(key)) { string mandatory = matches[2].Groups[2].Value; string citation = matches[3].Groups[2].Value; citations.map.Add(key, citation); if (mandatory.EqualsIgnoreCase("true")) { citations.mandatory.Add(key); } } } } return(citations); }
/// <summary> /// Categorize properties of page to Infobox, Citation, Geobox /// </summary> /// <param name="pages">List of pages</param> private static void CategorizeProperties(List <Page> pages) { foreach (var page in pages) { foreach (var item in page.Infoboxes) { var type = item.GetType(); item.SetRegexAttributes(); if (type == typeof(Infobox)) { var info = item as Infobox; Locations.AddRange(GetNamedEntities(info, NamedEntityType.Location)); Persons.AddRange(GetNamedEntities(info, NamedEntityType.Person)); Organizations.AddRange(GetNamedEntities(info, NamedEntityType.Organization)); Infoboxes.Add(info); } else if (type == typeof(Citation)) { var cit = item as Citation; cit.AddFullNames(); Locations.AddRange(GetNamedEntities(cit, NamedEntityType.Location)); Persons.AddRange(GetNamedEntities(cit, NamedEntityType.Person)); Organizations.AddRange(GetNamedEntities(cit, NamedEntityType.Organization)); Citations.Add(cit); } else if (type == typeof(Geobox)) { var geo = item as Geobox; Locations.AddRange(GetNamedEntities(geo, NamedEntityType.Location)); Persons.AddRange(GetNamedEntities(geo, NamedEntityType.Person)); Geoboxes.Add(geo); } } } }
protected void Page_Load(object sender, EventArgs e) { { SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = "cop4474cdvargasanchondo.database.windows.net"; builder.UserID = "dvargasanchondo"; builder.Password = "******"; builder.InitialCatalog = "CitationDB2_db"; using (SqlConnection connection = new SqlConnection(builder.ConnectionString)) { connection.Open(); SqlDataAdapter sqlDa = new SqlDataAdapter("select fullcite from Citations where UserID='" + Session["UserID"] + "'", connection); DataTable dtbl = new DataTable(); sqlDa.Fill(dtbl); Citations.DataSource = dtbl; Citations.DataBind(); connection.Close(); } } }
private IEnumerator LoadCitations() { yield return(CitationsConfig.Load(Paths.Data + CITATIONS_FILE, (t) => citations = t)); }