lo que hice hoy
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Entidades.Dto;
|
||||
|
||||
namespace AlquilaFacil.Builder;
|
||||
|
||||
public class CanonDtoBuilder : Builder<CanonDto>{
|
||||
public CanonDtoBuilder SetId(long id) {
|
||||
data.Id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CanonDtoBuilder SetMesNum(int mesNum) {
|
||||
data.MesNum = mesNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CanonDtoBuilder SetMes(DateTime d){
|
||||
data.Mes = d;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CanonDtoBuilder SetMonto(Decimal monto) {
|
||||
data.Monto = monto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CanonDtoBuilder SetDivisa(string divisa) {
|
||||
data.Divisa = divisa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CanonDtoBuilder SetPago(bool p) {
|
||||
data.Pago = p;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using Entidades.Dto;
|
||||
|
||||
namespace AlquilaFacil.Builder;
|
||||
public class ContratoPropiedadDtoBuilder : Builder<ContratoPropiedadDto>{
|
||||
public ContratoPropiedadDtoBuilder SetId(long id ){
|
||||
data.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetUbicacion(string ub){
|
||||
data.Ubicacion = ub;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetTipo(string tipo){
|
||||
data.TipoPropiedad = tipo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetFechaInicio(DateTime fec) {
|
||||
data.Fechainicio = fec;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetInquilino(string inquilino){
|
||||
data.Inquilino = inquilino;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetPropietario(string propietario){
|
||||
data.Propietario = propietario;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetEstado(ulong habilitado, ulong cancelado) {
|
||||
bool Habilitado = habilitado == 0?false:true;
|
||||
bool Cancelado = cancelado == 0?false:true;
|
||||
|
||||
if (Habilitado == true && Cancelado == false){
|
||||
data.Estado = "Alquiler Iniciado";
|
||||
} else if (Cancelado == true && Habilitado == true) {
|
||||
data.Estado = "Nunca Empezo Esta Cancelado";
|
||||
}
|
||||
|
||||
if (Habilitado == false && Cancelado ==false){
|
||||
data.Estado = "Esta en Proceso";
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetHabitaciones(int habitaciones){
|
||||
data.Habitaciones = habitaciones;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetPiso(int piso){
|
||||
data.Piso = piso;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetLetra(string letra){
|
||||
data.Letra = letra;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetMesesAumento(int mesesAumento){
|
||||
data.MesesAumento = mesesAumento;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContratoPropiedadDtoBuilder SetMesesDuracion(int mesesDurationContrato) {
|
||||
data.MesesDuracion = mesesDurationContrato;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user