inserta cuenta
This commit is contained in:
@@ -222,5 +222,35 @@ namespace compabetov2.database
|
||||
{
|
||||
return DAO.actualizarMermaDAO(merma);
|
||||
}
|
||||
|
||||
public static bool crearCuenta(Cuenta cuenta, List<DetalleCuentaModel> detalleCuentas)
|
||||
{
|
||||
return DAO.crearCuentaDAO(cuenta, detalleCuentas);
|
||||
}
|
||||
|
||||
public static List<Cuenta> conseguirCuentaDAO()
|
||||
{
|
||||
List<Cuenta> cuentas = new List<Cuenta>();
|
||||
SQLiteDataReader reader = DAO.conseguirCuentaDAO();
|
||||
|
||||
while(reader.Read())
|
||||
{
|
||||
long idCuenta = reader.GetInt64(0);
|
||||
long total = reader.GetInt64(1);
|
||||
string fecha = reader["fecha"].ToString();
|
||||
string estado = reader["estado"].ToString();
|
||||
string descripcion = reader["descripcion"].ToString();
|
||||
|
||||
Cuenta cuenta = new Cuenta(
|
||||
(int) total,
|
||||
fecha,
|
||||
estado,
|
||||
descripcion,
|
||||
(int)idCuenta
|
||||
);
|
||||
cuentas.Add(cuenta);
|
||||
}
|
||||
return cuentas;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user