public bool GerarEntrada(ParkingInOut parkingInOut) { var dbTableId = _dbTableApp.Search(c => c.TableName == "ParkingInOut").Select(c => new { c.Id }).FirstOrDefault(); parkingInOut.TicketNumber = _autNumApp.GerarSequencia(dbTableId.Id, "TicketNumber").GetValueOrDefault(0); parkingInOut.ParkingDateTimeInput = DateTime.Now; return(_epr.InsertOrUpdate(parkingInOut)); }
public override void ButtonActive_Click(object sender, RoutedEventArgs e) { base.ButtonActive_Click(sender, e); if (IsValid()) { reportViewer1.PrintDialog(); CurrentControl = new ParkingInOut(); RefreshControls(); } }
private void SComponent_ValueChanged(object sender, EventArgs e) { if (TicketNumber.ObjectControl != null) { CurrentControl = TicketNumber.ObjectControl as IEntityBase; RefreshControls(); TicketNumber.SComponent.BackColor = System.Drawing.Color.LightGreen; UpdateReport(); } else { var value = ((NumericUpDown)sender).Value; CurrentControl = new ParkingInOut() { TicketNumber = value }; RefreshControls(); TicketNumber.SComponent.BackColor = System.Drawing.Color.LightCoral; TicketNumber.SetError("Registro não encontrado", -40); TicketNumber.SetFocus(); } }
public bool Save(ParkingInOut ParkingInOut) { _ParkingInOutApp.InsertOrUpdate(ParkingInOut); return(_connection.Save()); }
public bool GerarSaida(ParkingInOut ParkingInOut) { ParkingInOut.Closed = Core.Domain.EnumBase.YesNo.Yes; _ParkingInOutApp.GerarEntrada(ParkingInOut); return(_connection.Save()); }
public bool InsertOrUpdate(ParkingInOut ParkingInOut) { return(_epr.InsertOrUpdate(ParkingInOut)); }