Example #1
0
        private void bunifuThinButton21_Click(object sender, EventArgs e)
        {
            // string hora = DateTime.Now.Hour <= 9 ? "0" + DateTime.Now.Hour. : DateTime.Now.Hour;
            Turno t = new Turno()
            {
                Data     = DateTime.Now,
                Estado   = "Aberto",
                Hora     = DateTime.Now.ToShortTimeString(),
                Caixa    = decimal.Parse(textEdit1.Text),
                Abertura = decimal.Parse(textEdit1.Text),
                Tpa      = 0,
                UserId   = UserCurrent.getCurrentUser().Id,
                UserName = UserCurrent.getCurrentUser().Nome,
                DataF    = DateTime.Now,
                HoraF    = DateTime.Now.ToShortTimeString(),
            };
            TurnoController _turnoController = new TurnoController();

            _turnoController.insert(t);   TurnoCurrent.initialize(t);
            frmC.setButtonFalse();
            frmC.fillData();
            FrmReportView frm = new FrmReportView();

            frm.PrintOpenBox(TurnoCurrent.getTurnoCurrent());

            Close();
            // Hide();
        }
Example #2
0
        private void btnOpenClose_Click(object sender, EventArgs e)
        {
            Turno t = TurnoCurrent.getTurnoCurrent();

            t.Estado = "Fechado";
            new TurnoController().update(t);
            TurnoCurrent.initialize(null);
            frmC.fillData();
            Close();
        }