public int CompareTo(object obj) { if (obj == null) { return(1); } Persoana persoana = obj as Persoana; if (persoana != null) { var compData = DataNastere.CompareTo(persoana.DataNastere); if (compData == 0) { return(CNP.CompareTo(persoana.CNP)); } else { return(compData); } } else { throw new ArgumentException("Object is not a " + this.GetType()); } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (this.GetType() != obj.GetType()) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } if (this.GetHashCode() != obj.GetHashCode()) { return(false); } Persoana persoana = obj as Persoana; return(Nume.Equals(persoana.Nume) && Prenume.Equals(persoana.Prenume) && Email.Equals(persoana.Email) && Cetatenie.Equals(persoana.Cetatenie) && DataNastere.Equals(persoana.DataNastere) && NumarPasaport.Equals(persoana.NumarPasaport) && Telefon.Equals(persoana.Telefon) && CNP.Equals(persoana.CNP) && Sex.Equals(persoana.Sex)); }
/// <summary> /// Initializes the Erebus libraries. /// </summary> public static void Run() { HDP.Register(); SSMP.Register(); CNP.Register(); PlatformServiceProvider.RegisterService <VerificationKeyProvider>(); }
public override bool Equals(object obj) { var student = (Pacient)obj; if (student != null) { return(CNP.Equals(student.CNP)); } return(false); }
public void CreateValueObject(Farmacist f) { this.Nume = new Text(f.strNume); this.Prenume = new Text(f.strPrenume); this.cnp = new CNP(new Text(f.strCNP)); this.nrTelefon = new NrTelefon(new Text(f.strNrTelefon)); this.email = new Email(new Text(f.strEmail)); this.adresaFarmacie = new AdresaFarmacie(new Text(f.strAdresaFarmacie)); this.parola = new Parola(new Text(f.strParola)); }
private void clearFields() { firstName.Clear(); lastName.Clear(); CNP.Clear(); ICN.Clear(); address.Clear(); clientId = 0; searchCNP.Clear(); }
public async Task UpdateValueObjectUser(IFormCollection form) { try { this._name = new Text(form["strName"]); } catch { } try { this._surename = new Text(form["strSurename"]); } catch { } try { this._cnp = new CNP(new Text(form["strCNP"])); } catch { } try { this._iban = new IBAN(new Text(form["strIBAN"])); } catch { } try { if (this._iban != null) { this._bankAccount = new BankAccount(this._iban, 0); } } catch { } }
public async Task CreateValueObjectUser(IFormCollection form) { try { this._name = new Text(form["strName"]); } catch { } try{ this._surename = new Text(form["strSurename"]); } catch { } try{ this._username = new Text(form["strUsername"]); }catch { } try{ this._password = new Text(CryptoManager.ComputeSha256Hash(form["strPassword"])); }catch { } try{ this._cnp = new CNP(new Text(form["strCNP"])); }catch { } try{ this._iban = new IBAN(new Text(form["strIBAN"])); }catch { } try{ this._emailAddress = new EmailAddress(new Text(form["strEmail"])); }catch { } try{ if (this._iban != null) { this._bankAccount = new BankAccount(this._iban, 0); } }catch { } }
public bool IsValid() { using (StreamReader sr = new StreamReader("user.txt")) { string line = string.Empty; while ((line = sr.ReadLine()) != null) { var splitLine = line.Split(' '); var cnp = splitLine[0]; var password = splitLine[1]; if (CNP.Equals(cnp) && Password.Equals(password)) { return(true); } } } return(false); }
/// <summary> /// Initializes the Erebus libraries. /// </summary> public static void Run() { HDP.Register(); SSMP.Register(); CNP.Register(); PlatformServiceProvider.RegisterService <VerificationKeyProvider>(); Log.EntryRecorded += (sender, e) => logFileTsm.RunSafe(() => { using (var w = new FileWriter(logFile, true)) using (var p = new PrintWriter(w)) { p.Println($"[{DateTime.Now}] [{sender}/{e.Severity}]: {e.Message}"); p.Flush(); } }); Log.EntryRecorded += (sender, e) => { switch (e.Severity) { case LogEntrySeverity.Info: global::Android.Util.Log.Info(sender.ToString(), e.Message); break; case LogEntrySeverity.Warning: global::Android.Util.Log.Warn(sender.ToString(), e.Message); break; case LogEntrySeverity.Error: global::Android.Util.Log.Error(sender.ToString(), e.Message); break; case LogEntrySeverity.Fatal: global::Android.Util.Log.Error(sender.ToString(), "FATAL: " + e.Message); break; } }; }
public string ConversieLaSir_PentruScriereInFisier() { string s = string.Format("{1}{0}{2}{0}{3}{0}{4}{0}{5}", SEPARATOR_PRINCIPAL_FISIER, id.ToString(), (Nume ?? " NECUNOSCUT "), (Prenume ?? " NECUNOSCUT "), CNP.ToString(), ID_Masa.ToString()); return(s); }
public override int GetHashCode() { return(CNP.GetHashCode()); }
public override int GetHashCode()//HashCode = sort of fingerprint { return(CNP.GetHashCode() ^ LastName.GetHashCode()); }