/// <summary> /// Returns true if MandateSepaDirectDebit instances are equal /// </summary> /// <param name="other">Instance of MandateSepaDirectDebit to be compared</param> /// <returns>Boolean</returns> public bool Equals(MandateSepaDirectDebit other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Creditor == other.Creditor || Creditor != null && Creditor.Equals(other.Creditor) ) && ( MandateId == other.MandateId || MandateId != null && MandateId.Equals(other.MandateId) ) && ( BankAccountIban == other.BankAccountIban || BankAccountIban != null && BankAccountIban.Equals(other.BankAccountIban) ) && ( CustomerContractIdentifier == other.CustomerContractIdentifier || CustomerContractIdentifier != null && CustomerContractIdentifier.Equals(other.CustomerContractIdentifier) ) && ( Debtor == other.Debtor || Debtor != null && Debtor.Equals(other.Debtor) ) && ( IsRecurring == other.IsRecurring || IsRecurring != null && IsRecurring.Equals(other.IsRecurring) ) && ( MandateApproval == other.MandateApproval || MandateApproval != null && MandateApproval.Equals(other.MandateApproval) ) && ( PreNotification == other.PreNotification || PreNotification != null && PreNotification.Equals(other.PreNotification) )); }
public ActionResult MyMandate() { List <MandateViewModels> liste = new List <MandateViewModels>(); if (Session.Count == 0) { return(RedirectToAction("Login", "Home")); } if (Session["role"].Equals("Client") && Session["token"] != null) { if (ms.getByClient((int)Session["id"]).Capacity == 0) { return(View(liste)); } else { foreach (var i in ms.getByClient((int)Session["id"])) { MandateViewModels m = new MandateViewModels(); SResourceViewModels ress = new SResourceViewModels(i.person); SprojectViewModels pro = new SprojectViewModels(i.project); SResourceViewModels gps; if (i.person1 != null) { gps = new SResourceViewModels(i.person1); } else { gps = new SResourceViewModels(); } m.projet = pro; m.ressource = ress; m.gps = gps; m.montant = (double)i.montant; MandateId mi = new MandateId(); mi.dateDebut = i.dateDebut; mi.dateFin = i.dateFin; mi.projetId = i.projetId; mi.ressourceId = i.ressourceId; m.mandateId = mi; liste.Add(m); } return(View(liste)); } } return(RedirectToAction("Login", "Home")); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Creditor != null) { hashCode = hashCode * 59 + Creditor.GetHashCode(); } if (MandateId != null) { hashCode = hashCode * 59 + MandateId.GetHashCode(); } if (BankAccountIban != null) { hashCode = hashCode * 59 + BankAccountIban.GetHashCode(); } if (CustomerContractIdentifier != null) { hashCode = hashCode * 59 + CustomerContractIdentifier.GetHashCode(); } if (Debtor != null) { hashCode = hashCode * 59 + Debtor.GetHashCode(); } if (IsRecurring != null) { hashCode = hashCode * 59 + IsRecurring.GetHashCode(); } if (MandateApproval != null) { hashCode = hashCode * 59 + MandateApproval.GetHashCode(); } if (PreNotification != null) { hashCode = hashCode * 59 + PreNotification.GetHashCode(); } return(hashCode); } }