コード例 #1
0
        private void CloseTill()
        {
            frmLogout frmLogout = new frmLogout(usersService.Find(Convert.ToInt32(lblUserId.Text)));

            frmLogout.frmMain = this;
            frmLogout.ShowDialog();

            if (frmLogout.DialogResult == DialogResult.OK)
            {
                btnOpenTill.Enabled = true;

                lblNombreUsuario.Text = "-";
                lblUserId.Text        = "-";

                workshisftService.CloseLastWorkshift();

                btnCloseTill.Enabled = false;
            }
            else if (frmLogout.DialogResult == DialogResult.No)
            {
                btnOpenTill.Enabled  = false;
                btnCloseTill.Enabled = true;
            }
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: njmube/PoS
        private void CloseTill()
        {
            frmLogout frmLogout = new frmLogout(usersService.Find(Convert.ToInt32(lblUserId.Text)));
            frmLogout.frmMain = this;
            frmLogout.ShowDialog();

            if (frmLogout.DialogResult == DialogResult.OK)
            {
                btnOpenTill.Enabled = true;
                
                lblNombreUsuario.Text = "-";
                lblUserId.Text = "-";

                workshisftService.CloseLastWorkshift();
                
                btnCloseTill.Enabled = false;
            }
            else if (frmLogout.DialogResult == DialogResult.No)
            {
                btnOpenTill.Enabled = false;
                btnCloseTill.Enabled = true;
            }
        }