private void Init() { tbDate.Text = DateTime.Now.Date.ToString("dd-MM-yyyy"); tbTime.Text = DateTime.Now.ToShortTimeString(); parkingDao = new ParkingDao(); }
private void Init() { parkingDao = new ParkingDao(); List <PriceDto> priceList = parkingDao.GetPriceList(); if (priceList != null) { _priceList = priceList; } }
public IActionResult ObterValorAtualTicket(string ticket) { dao = new ParkingDao(); Ticket dadosTicket = dao.GetTicket(ticket); TabelaDePreco tabelaPreco = dao.GetTabelaPreco(dadosTicket.tabela); Carro carro = dao.GetRegistroCarro(ticket); TimeSpan tempo = DateTime.Now - carro.dtInicio; double valor = (tempo.TotalHours * tabelaPreco.vlAdicional) + dadosTicket.valor; return(Ok(valor.ToString("0.00"))); }
public IActionResult EstacionarCarro(string placa, string setor, string tabelaDePreco) { dao = new ParkingDao(); string ticket = Guid.NewGuid().ToString(); double valor = dao.GetTabelaPreco(tabelaDePreco).vlMinimo; if (dao.SetTicket(ticket, valor, tabelaDePreco)) { dao.SetEstacionar(placa, setor, ticket); return(Ok(ticket)); } else { return(Unauthorized()); } }
private void Init() { parkingDao = new ParkingDao(); }
private void Init() { statistiscDao = new StatistiscDao(); parkingDao = new ParkingDao(); }
public IActionResult ObterValorPeriodo(DateTime dataInicio, DateTime dataFim) { dao = new ParkingDao(); return(Ok(dao.GetValorPeriodo(dataInicio, dataFim))); }
public IActionResult PagarTicket(string ticket, double valor) { dao = new ParkingDao(); return(Ok(dao.SetPagarTicket(ticket, valor) ? "PAGO" : "NÃO PAGO")); }
public IActionResult ObterTabelas(string tabela) { dao = new ParkingDao(); return(Ok(dao.GetTabelaPreco(tabela))); }
public IActionResult ObterVagas(string sigla) { dao = new ParkingDao(); return(Ok(dao.GetVagas(sigla))); }