Пример #1
0
 public Conta(int id, int mes, double leitura_anterior, double leitura_atual, Titular pessoa)
 {
     this.id  = id;
     this.mes = mes;
     this.leitura_anterior = leitura_anterior;
     this.leitura_atual    = leitura_atual;
     this.pessoa           = pessoa;
 }
Пример #2
0
 public Agua(int id, int mes, double leitura_anterior, double leitura_atual, Titular pessoa) : base(id, mes, leitura_anterior, leitura_atual, pessoa)
 {
     this.id  = id;
     this.mes = mes;
     this.leitura_anterior = leitura_anterior;
     this.leitura_atual    = leitura_atual;
     this.pessoa           = pessoa;
 }
Пример #3
0
        public bool Equals(IDados d)
        {
            Titular aux = (Titular)d;

            if (aux.cpf == this.cpf)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #4
0
        public int CompareTo(IDados other)
        {
            Titular aux      = (Titular)other;
            long    cpfthis  = Convert.ToInt64(this.cpf.Replace(".", "").Replace("-", ""));
            long    cpfother = Convert.ToInt64(aux.cpf.Replace(".", "").Replace("-", ""));

            if (cpfthis > cpfother)
            {
                return(1);
            }
            else if (cpfthis == cpfother)
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        }