using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LLNet.Tienda.Dialogs.Observations
{
    public partial class dlgEfectivoEmpresa : GUI.FormBases.frmBase
    {
        #region Constructores

        public dlgEfectivoEmpresa()
        {
            InitializeComponent();


            GUI.CApp.TraducirForm(this);
        }

        public dlgEfectivoEmpresa(string observacion)
        {
            InitializeComponent();

            txtObservaciones.Text = observacion;

            GUI.CApp.TraducirForm(this);
        }

        #endregion

        private void btnAceptar_Click(object sender, EventArgs e)
        {
            
            //Program.FrmMainPos.RefreshData();
            DialogResult = DialogResult.OK;
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        private void dlgEfectivoEmpresa_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            { 
                case Keys.F12:
                    btnAceptar_Click(null, null);
                    break;
                case Keys.Escape:
                    btnCancelar_Click(null, null);
                    break;
            }
        }

        private void dlgEfectivoEmpresa_Load(object sender, EventArgs e)
        {
            txtObservaciones.Focus();
        }

        public string Observacion() {
            return this.txtObservaciones.Text;
        }
    }
}