Пример #1
0
        private bool InsertcommentInit()
        {
            bool         ans    = false;
            DialogResult result = MetroFramework.MetroMessageBox.Show(this, "El salo inicial de la caja no coincide con el total calculado" +
                                                                      System.Environment.NewLine + "Seleccione NO para verificar la cantidad en caja." +
                                                                      System.Environment.NewLine + "Seleccione Yes para crear una nota", "Los saldos no coinciden",
                                                                      MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (result == DialogResult.Yes)
            {
                Coments coments = new Coments();
                coments.countingup = true;
                DialogResult res = coments.ShowDialog();
                if (res == DialogResult.OK)
                {
                    idcomment = coments.idcomment;
                }
                ans = true;
            }
            if (result == DialogResult.No)
            {
                ans = false;
            }
            return(ans);
        }
Пример #2
0
        private void MessaComments()
        {
            Coments comments = new Coments();

            comments.idcashout = idcashout;
            comments.ShowDialog(this);
            this.Close();
        }
Пример #3
0
        private void metroTextButton1_Click(object sender, EventArgs e)
        {
            bool correct = false;

            var totalUser = GetTotal();

            totalSystem = GetTotalSystem();

            if (totalUser != totalSystem)
            {
                var diferencecash = totalUser - totalSystem;
                MetroFramework.MetroMessageBox.Show(this, "Existe una difirencia de: " + diferencecash.ToString() + " en los saldos", "Saldos Diferentes", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            DialogResult response = MetroFramework.MetroMessageBox.Show(this, "Una vez cerrado el turno este usuario no podra iniciar nuevamente sesion durante este dia, salvo registrar el corte de caja, ¿Esta seguro de que desea registrar su corte de turno?", "Cierre de turno", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (response == DialogResult.OK)
            {
                if (totalUser > 0)
                {
                    if (totalUser != totalSystem)
                    {
                        DialogResult saldobilletesuser = MetroFramework.MetroMessageBox.Show(this, "El saldo total introducido por el usuario: " + totalUser.ToString() + " no coinciden con el calculado por el sistema: " + totalSystem.ToString() + ", ¿Esta seguro de registrar corte de turno?", "Cierre de turno", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                        if (saldobilletesuser == DialogResult.OK)
                        {
                            Coments comen = new Coments();
                            comen.commentfrom = "CutDay";
                            comen.daycut      = true;
                            DialogResult res = comen.ShowDialog(this);
                            if (res == DialogResult.OK)
                            {
                                idcomment = comen.idcomment;
                            }
                            correct = InsertCasing();
                            this.Close();
                        }
                        else
                        {
                            this.Close();
                        }
                    }
                    else
                    {
                        correct = InsertCasing();
                        this.Close();
                    }
                    if (correct)
                    {
                        closeturn();
                    }
                }
            }
        }