private void btnNuevo_Click(object sender, EventArgs e)
 {
     Botonera(2);
     Grupo.Enabled = true;
     Clases.cFunciones fun = new Clases.cFunciones();
     fun.LimpiarGenerico(this);
 }
Пример #2
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();

            if (txt_Nombre.Text == "")
            {
                Mensaje("Debe ingresar una descripción para continuar");
                return;
            }

            txt_PrecioVenta.Text = txt_PrecioVenta.Text.Replace(".", "");
            if (txtCodigo.Text == "")
            {
                fun.GuardarNuevoGenerico(this, "Joya");
            }
            else
            {
                fun.ModificarGenerico(this, "Joya", "CodJoya", txtCodigo.Text);
            }

            Mensaje("Datos grabados correctamente");
            Botonera(1);
            fun.LimpiarGenerico(this);

            txtCodigo.Text = "";
            Grupo.Enabled  = false;
        }
Пример #3
0
 private void btnNuevo_Click(object sender, EventArgs e)
 {
     Botonera(2);
     Grupo.Enabled = true;
     Clases.cFunciones fun = new Clases.cFunciones();
     fun.LimpiarGenerico(this);
     txtM_Fecha.Text = DateTime.Now.ToShortDateString();
 }
        private void btnCancelar_Click(object sender, EventArgs e)
        {
            cFunciones fun = new Clases.cFunciones();

            txtCodigo.Text  = "";
            txt_Nombre.Text = "";
            Botonera(1);
            Grupo.Enabled = false;
            fun.LimpiarGenerico(this);
        }
Пример #5
0
 private void btnNuevo_Click(object sender, EventArgs e)
 {
     Botonera(2);
     Grupo.Enabled = true;
     Clases.cFunciones fun = new Clases.cFunciones();
     fun.LimpiarGenerico(this);
     txtPorEfectivo.Text = "70";
     txtPorTarjeta.Text  = "100";
     txt_Nombre.Focus();
 }
Пример #6
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtM_Fecha.Text) == false)
            {
                Mensaje("La fecha no es válida");
                return;
            }
            if (txt_Nombre.Text == "")
            {
                Mensaje("Debe ingresar una descripción para continuar");
                return;
            }
            if (txtCodigo.Text == "")
            {
                fun.GuardarNuevoGenerico(this, "Articulo");
            }
            else
            {
                // if (txt_Ruta.Text != "")
                //   txt_Ruta.Text = txt_Ruta.Text.Replace("\\", "\\\\");
                fun.ModificarGenerico(this, "Articulo", "CodArticulo", txtCodigo.Text);
            }

            Mensaje("Datos grabados correctamente");
            if (txt_Ruta.Text != "")
            {
                Imagen.Image.Save(txt_Ruta.Text);
            }

            if (txt_CodigoBarra.Text != "")
            {
                var result = MessageBox.Show("Desea Imprimir", "Información",
                                             MessageBoxButtons.YesNo,
                                             MessageBoxIcon.Question);
                if (result == DialogResult.Yes)
                {
                    cCodigoBarra objCodBarra = new cCodigoBarra();
                    objCodBarra.Insertar(ImagenCodigo, 1, 2);
                    FrmVerReporteBarra frm = new FrmVerReporteBarra();
                    frm.Show();
                }
            }

            Botonera(1);
            fun.LimpiarGenerico(this);
            Imagen.Image       = null;
            ImagenCodigo.Image = null;
            txtCodigo.Text     = "";
            Grupo.Enabled      = false;
        }
Пример #7
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txt_Costo.Text != "")
            {
                txt_Costo.Text = txt_Costo.Text.Replace(",", ".");
            }

            if (txt_PrecioEfectivo.Text != "")
            {
                txt_PrecioEfectivo.Text = txt_PrecioEfectivo.Text.Replace(",", ".");
            }

            if (txt_PrecioTarjeta.Text != "")
            {
                txt_PrecioTarjeta.Text = txt_PrecioTarjeta.Text.Replace(",", ".");
            }

            if (txt_Nombre.Text == "")
            {
                Mensaje("Debe ingresar una descripción para continuar");
                return;
            }
            if (txtCodigo.Text == "")
            {
                fun.GuardarNuevoGenerico(this, "Juguete");
            }
            else
            {
                // if (txt_Ruta.Text != "")
                //   txt_Ruta.Text = txt_Ruta.Text.Replace("\\", "\\\\");
                fun.ModificarGenerico(this, "Juguete", "CodArticulo", txtCodigo.Text);
            }

            Mensaje("Datos grabados correctamente");
            txtPorEfectivo.Text = "";
            txtPorTarjeta.Text  = "";
            Botonera(1);
            fun.LimpiarGenerico(this);

            txtCodigo.Text = "";
            Grupo.Enabled  = false;
        }
Пример #8
0
 private void btnAceptar_Click(object sender, EventArgs e)
 {
     Clases.cFunciones fun = new Clases.cFunciones();
     if (txt_Nombre.Text == "")
     {
         Mensaje("Debe ingresar un color");
         return;
     }
     if (txtCodigo.Text == "")
     {
         fun.GuardarNuevoGenerico(this, "Color");
     }
     else
     {
         // if (txt_Ruta.Text != "")
         //   txt_Ruta.Text = txt_Ruta.Text.Replace("\\", "\\\\");
         fun.ModificarGenerico(this, "Color", "CodColor", txtCodigo.Text);
     }
     fun.LimpiarGenerico(this);
     Mensaje("Datos grabados correctamente");
 }