This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FutureBuilder<String>( | |
future: _calculation, // a previously-obtained Future<String> or null | |
builder: (BuildContext context, AsyncSnapshot snapshot) { | |
if (snapshot.hasData) { | |
if (snapshot.data!=null) { | |
return new Column ( | |
children: <Widget>[ | |
new Expanded( | |
child: new ListView( | |
children: _getData(snapshot), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BancoDeDados | |
{ | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
public class ExtratoCategoriaView | |
{ | |
public int Ordem { get; set; } | |
public decimal Credito { get; set; } | |
public decimal Debito { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BancoDeDados; | |
using Newtonsoft.Json.Linq; | |
using RegraDeNegocio; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
namespace WebAPI.Controllers | |
{ | |
[RoutePrefix("movimento")] | |
public class MovimentoController : ApiController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace BancoDeDados | |
{ | |
public class DashBoardResumoView | |
{ | |
public DashBoardResumo DashBoardResumo { get; set; } | |
public List<ExtratoCategoriaView> Categorias { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public virtual DbSet<Conta> Contas { get; set; } | |
public virtual DbSet<Categoria> Categorias { get; set; } | |
public virtual DbSet<TipoMovimento> TiposMovimento { get; set; } | |
public virtual DbSet<Movimento> Movimentos { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BancoDeDados; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace RegraDeNegocio | |
{ | |
public class MovimentoNegocio | |
{ | |
public ADSResposta Salvar(MovimentoView c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BancoDeDados | |
{ | |
using System; | |
public class MovimentoView | |
{ | |
public string Codigo { get; set; } | |
public string Descricao { get; set; } | |
public string Data { get; set; } | |
public decimal Valor { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public virtual ICollection<Movimento> Movimentos { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BancoDeDados | |
{ | |
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
[Table("Movimento")] | |
public class Movimento | |
{ | |
public int Codigo { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
[ActionName("excluir")] | |
public async Task<IHttpActionResult> Excluir([FromBody] JObject jsonData) | |
{ | |
CategoriaView categoria = jsonData.SelectToken("Categoria").ToObject<CategoriaView>(); | |
return Ok((new CategoriaNegocio().Excluir(categoria))); | |
} |
NewerOlder