示例#1
0
        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));
        }
示例#2
0
 public override void ButtonActive_Click(object sender, RoutedEventArgs e)
 {
     base.ButtonActive_Click(sender, e);
     if (IsValid())
     {
         reportViewer1.PrintDialog();
         CurrentControl = new ParkingInOut();
         RefreshControls();
     }
 }
示例#3
0
        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());
 }
示例#6
0
 public bool InsertOrUpdate(ParkingInOut ParkingInOut)
 {
     return(_epr.InsertOrUpdate(ParkingInOut));
 }