public int CompareTo(NAW andereNaw) { // signal compare to Logger Logger.Instance.LogCompare(); if (andereNaw.Naam == Naam && andereNaw.Adres == Adres && andereNaw.Woonplaats == Woonplaats) { return(0); } else { if (andereNaw.Woonplaats != Woonplaats) { // woonplaatsen zijn verschillend return(Woonplaats.CompareTo(andereNaw.Woonplaats)); } else if (andereNaw.Naam != Naam) { // woonplaatsen zijn verschillend en namen zijn verschillend return(Naam.CompareTo(andereNaw.Naam)); } else { // woonplaatsen en namen zijn gelijk return(Adres.CompareTo(andereNaw.Adres)); } } }
private string GenereerLogin() { string fullName = ""; fullName += voornaam.ToLower().Substring(0, 4) + Naam.ToLower().Substring(0, 4); return(fullName + "@student.arteveldehs.be"); }
private string GenereerGebruikersnaam() { string fullName = ""; fullName += voornaam.ToLower().Substring(0, 4) + Naam.ToLower().Substring(0, 4); return(fullName); }
public override bool Equals(object obj) { return(obj is Speler speler && Naam.Equals(speler.Naam) && RugNummer == speler.RugNummer && TransferWaarde == speler.TransferWaarde); }
private void btnAdd_Click(object sender, EventArgs e) { string Naam, Surname, userName; int passWord; bool isAdmin = false; if (rdbAdminYes.Checked) { isAdmin = true; } else if (rdbAdminNo.Checked) { isAdmin = false; } if (!Validation.EmployeeName(txtName.Text)) { lblNaam.ForeColor = Color.Red; } else { lblNaam.ForeColor = Color.Black; } if (!Validation.EmployeeSurname(txtSurname.Text)) { lblSurname.ForeColor = Color.Red; } else { lblSurname.ForeColor = Color.Black; } var oleDbConnection = new OleDbConnection(Global.connString); if (Validation.EmployeeName(txtName.Text) && Validation.EmployeeSurname(txtSurname.Text)) { Naam = txtName.Text; Surname = txtSurname.Text; userName = Naam.Substring(0, 1) + Surname.Substring(0, 3); passWord = passRandom.Next(1000, 9999); oleDbConnection.Open(); var myCommand = new OleDbCommand(); myCommand.Connection = oleDbConnection; myCommand.CommandText = "INSERT INTO Users (Employee_Name,Employee_Surname,Employee_Id,Admin_rights,Employee_Password) Values ('" + Naam + "','" + Surname + "','" + userName + "'," + isAdmin + "," + passWord + ")"; myCommand.ExecuteNonQuery(); MessageBox.Show("Data inserted successfully", "Inserted Data", MessageBoxButtons.OK, MessageBoxIcon.Information); oleDbConnection.Close(); Hide(); var form = new AddandRemoveUser(); form.Show(); } else { MessageBox.Show("Please enter values into all field", "Error in field", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public bool Contains(string zoekterm) { if (Naam.IndexOf(zoekterm, StringComparison.OrdinalIgnoreCase) >= 0) { return(true); } return(false); }
public string GetCode() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(Merk.Substring(0, 3).ToUpper()); stringBuilder.Append(Naam.Substring(0, 3).ToUpper()); stringBuilder.Append(Volume.Replace(' ', '_')); return(stringBuilder.ToString()); }
public void SetAllIdentifyingNames(string search, string replace) { Naam = Naam.Replace(search, replace); Define = Define.Replace(search, replace); foreach (ITemplatable templdp in Detectoren) { templdp.SetAllIdentifyingNames(search, replace); } }
public override int GetHashCode() { int hash = 17; hash = hash * 23 + Naam.GetHashCode(); hash = hash * 23 + Adres.GetHashCode(); hash = hash * 23 + Woonplaats.GetHashCode(); return(hash); }
public bool Equals(Tuin t) { if (Id == t.Id && Straat.Equals(t.Straat) && Nummer.Equals(t.Nummer) && Naam.Equals(t.Naam) && Stad.Equals(t.Stad)) { return(true); } else { return(false); } }
private void btnOpslaan_Click(object sender, RoutedEventArgs e) { Naam deNaam = new Naam(); deNaam.Naam = txtboxnaam.Text db.items.InsertOnSubmit(deNaam); db.SubmitChanges(); dgItems.ItemsSource = db.items.ToList(); }
public string GetCode() { string result = null; if (true) { result = Merk.Substring(1, 3) + Naam.Substring(1, 3); } return(result); }
private string GenereerLogin() { string fullName = ""; if (voornaam.Length < 4) { fullName += voornaam.ToLower() + Naam.ToLower().Substring(0, 2); } else { fullName += voornaam.ToLower().Substring(0, 4) + Naam.ToLower().Substring(0, 2); } return(fullName + "@arteveldehs.be"); }
// GenereerLogin private string GenereerLogin() { string naam = ""; if (voornaam.Length < 4) { naam += voornaam.ToLower() + Naam.ToLower().Substring(0, 4); } else { naam += voornaam.ToLower().Substring(0, 4) + Naam.ToLower().Substring(0, 4); } return(naam + "@student.arteveldehs.be"); }
private string GenereerGebruikersnaam() { string fullName = ""; if (voornaam.Length < 4) { fullName += voornaam.ToLower() + Naam.ToLower().Substring(0, 2); } else { fullName += voornaam.ToLower().Substring(0, 4) + Naam.ToLower().Substring(0, 2); } return(fullName); }
// Methodes // GenereerGebruikersnaam private string GenereerGebruikersnaam() { string naam = ""; if (voornaam.Length < 4) { naam += voornaam.ToLower() + Naam.ToLower().Substring(0, 4); } else { naam += voornaam.ToLower().Substring(0, 4) + Naam.ToLower().Substring(0, 4); } return(naam); }
public override int GetHashCode() { // gegenereerde code unchecked { var hashCode = (Naam != null ? Naam.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Straat != null ? Straat.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Nummer.GetHashCode(); hashCode = (hashCode * 397) ^ (Bus != null ? Bus.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Postcode; hashCode = (hashCode * 397) ^ (Gemeente != null ? Gemeente.GetHashCode() : 0); hashCode = (hashCode * 397) ^ AantalWerkuren.GetHashCode(); return(hashCode); } }
public int CompareTo(Straatnaam straatnaam) { if (!ReferenceEquals(straatnaam, null)) { int compareTo = Naam.CompareTo(straatnaam.Naam); if (compareTo == 0) { compareTo = ID.CompareTo(straatnaam.ID); } return(compareTo); } else { return(+1); } }
private bool Valid() { ValidateLocations(); if (Naam == null || Naam.Equals("")) { MessageBox.Show("Vul een naam in"); return(false); } else if (SelectedGebruiker == null) { MessageBox.Show("Vul een inspecteur in"); return(false); } else if (SelectedKlant == null) { MessageBox.Show("Vul een evenement in"); return(false); } else if (SelectedOfferte == null) { MessageBox.Show("Vul een offerte in"); return(false); } else if (PostCode == null || PostCode.Equals("")) { MessageBox.Show("Vul een postcode in"); return(false); } else if (Datum == null) { MessageBox.Show("Vul een datum in"); return(false); } else if (huisnummer == 0 || huisnummer.Equals("")) { MessageBox.Show("Vul een huisnummer in"); return(false); } else if (SelectedStatus == null) { MessageBox.Show("Vul een status in"); return(false); } return(true); }
public int CompareTo(object obj) { if (obj == null) { return(1); } Product p = obj as Product; if (p == null) { return(1); } int result = Naam.CompareTo(p.Naam); if (result == 0) { result = Prijs.CompareTo(p.Prijs); } return(result); }
private void button1_Click(object sender, EventArgs e) { string userName; string passWord; //int admin = 0; //if (rdbAdminYes.Checked) //{ // admin = -1 ; //} var oleDbConnection = new OleDbConnection(Global.connString); if (txtNaam.Text != "" && txtSurname.Text != "") { Naam = txtNaam.Text; Surname = txtSurname.Text; userName = Naam.Substring(0, 1) + Surname.Substring(0, 3); Random passRandom = new Random(); passWord = (passRandom.Next(1000, 9000)).ToString(); oleDbConnection.Open(); var myCommand = new OleDbCommand(); myCommand.Connection = oleDbConnection; myCommand.CommandText = "INSERT INTO Users (Employee_Name,Employee_Surname,Employee_Id,Admin_rights) values('" + Naam + "','" + Surname + "','" + userName + "'," + rdbAdminYes.Checked + ")"; myCommand.ExecuteNonQuery(); MessageBox.Show("Data inserted successfully"); oleDbConnection.Close(); Hide(); AddandRemoveUser form = new AddandRemoveUser(); form.Show(); } else { MessageBox.Show("Invalid fields", "Invalid Fields", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public int CompareTo(Schip schip) { if (!ReferenceEquals(schip, null)) { int compareteTo = Naam.CompareTo(schip.Naam); if (compareteTo == 0) { compareteTo = Tonnage.CompareTo(schip.Tonnage); } if (compareteTo == 0) { compareteTo = Breedte.CompareTo(schip.Breedte); } if (compareteTo == 0) { compareteTo = Lengte.CompareTo(schip.Lengte); } return(compareteTo); } else { return(+1); } }
public override int GetHashCode() { return(SpelerID.GetHashCode() ^ Naam.GetHashCode()); }
public override int GetHashCode() { return(Naam.GetHashCode()); }
private bool Valid() { LocationEntryVM locTo; LocationEntryVM locFrom; try { locTo = apiConnector.getAdresLocation(this.PostCode + ", " + this.huisnummer); locFrom = apiConnector.getAdresLocation(SelectedGebruiker.Postcode + ", " + SelectedGebruiker.Huisnummer); return(true); } catch (Exception e) { MessageBox.Show("Postcode en huisnummer combinatie is incorrect!"); return(false); } if (Naam == null || Naam.Equals("")) { MessageBox.Show("Vul een naam in"); return(false); } else if (SelectedGebruiker == null) { MessageBox.Show("Vul een inspecteur in"); return(false); } else if (SelectedKlant == null) { MessageBox.Show("Vul een evenement in"); return(false); } else if (SelectedOfferte == null) { MessageBox.Show("Vul een offerte in"); return(false); } else if (PostCode == null || PostCode.Equals("")) { MessageBox.Show("Vul een postcode in"); return(false); } else if (Datum == null) { MessageBox.Show("Vul een datum in"); return(false); } else if (huisnummer == 0 || huisnummer.Equals("")) { MessageBox.Show("Vul een huisnummer in"); return(false); } else if (SelectedStatus == null) { MessageBox.Show("Vul een status in"); return(false); } return(true); }
public string GetCode() { return((Merk.Substring(0, 3) + Naam.Substring(0, 3) + Volume.Replace(' ', '_')).ToUpper()); }
public void SetAllIdentifyingNames(string search, string replace) { Naam = Naam.Replace(search, replace); Define = Define.Replace(search, replace); }
//Functie method TOONNAAM. public string ToonNaam() { return($"Lector {Voornaam} {Naam.ToUpper()}"); }
public override int GetHashCode() { return(Stamnummer.GetHashCode() ^ Naam.GetHashCode()); }
public string GetCode() { return $"{Merk.Substring(0, 3).ToUpper()}{Naam.Substring(0, 3).ToUpper()}{Volume.Replace(" ", "_")}"; }