Esempio n. 1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (validarNulosCabecera())
            {
                entrada.fecharecepcion = dtpFechaRemision.Value.Date;
                entrada.direccion      = txtDireccion.Text;
                entrada.receptor       = txtReceptor.Text;
                entrada.nrodocumento   = txtNumeroDoc.Text;
                if (txtReceptor.Text != null)
                {
                    entrada.receptor = txtReceptor.Text;
                }
                else
                {
                    frmException excepcion = new frmException();
                    excepcion.setearUrl("C:\\Users\\Panza\\source\\repos\\josepanz\\sistemaStock\\img\\algoAndaMal.jpg");
                    excepcion.Show();
                }

                entrada.nrodocumento = txtNumeroDoc.Text;

                EntradaProducto.Agregar(entrada);
                LimpiarCab();
                dtgDetalleEntradaProducto.DataSource = null;
                dtpFechaRemision.Value = System.DateTime.Now;
                entrada = new EntradaProducto();
            }
        }
Esempio n. 2
0
        private bool validarNulosDetalle()
        {
            bool         flag = true;
            frmException err  = new frmException();

            err.setearUrl("C:\\Users\\Panza\\source\\repos\\josepanz\\sistemaStock\\img\\algoAndaMal.jpg");

            if (dtpFechaRemision.Value == null)
            {
                err.Controls["txtMensaje"].Text = "Fecha";
                MessageBox.Show("Debe cargar el valor del campo de fecha", "ADVERTENCIA", MessageBoxButtons.OK, MessageBoxIcon.Error);
                dtpFechaRemision.Focus();
                return(flag = false);
            }

            if (cmbProducto.SelectedItem == null)
            {
                err.Controls["txtMensaje"].Text = "Debe cargar el valor del Producto";
                cmbProducto.Focus();
                mostrarForm(err);
                return(flag = false);
            }

            if (txtCantidad.Value <= 0)
            {
                err.Controls["txtMensaje"].Text = "Debe cargar el valor de la cantidad recibida";
                txtCantidad.Focus();
                mostrarForm(err);
                return(flag = false);
            }
            if (txtReceptor.Text.Trim() == null)
            {
                err.Controls["txtMensaje"].Text = "Debe cargar el valor del receptor";
                txtReceptor.Focus();
                mostrarForm(err);
                return(flag = false);
            }
            if (txtDireccion.Text.Trim() == null)
            {
                err.Controls["txtMensaje"].Text = "Debe cargar el valor de la direccion de recepcion";
                txtDireccion.Focus();
                mostrarForm(err);
                return(flag = false);
            }
            if (txtNumeroDoc.Text.Trim() == null)
            {
                err.Controls["txtMensaje"].Text = "Debe cargar el valor del numero de documento de la recepcion";
                txtNumeroDoc.Focus();
                mostrarForm(err);
                return(flag = false);
            }


            return(flag);
        }
Esempio n. 3
0
        public bool validarNulosCabecera()
        {
            bool         flag = true;
            frmException err  = new frmException();

            err.setearUrl("C:\\Users\\Panza\\source\\repos\\josepanz\\sistemaStock\\img\\algoAndaMal.jpg");
            if (dtgDetalleEntradaProducto.RowCount <= 0)
            {
                err.Controls["txtMensaje"].Text = "Debe agregar por lo menos un producto al detalle";
                cmbProducto.Focus();
                mostrarForm(err);
                return(flag = false);
            }

            return(flag);
        }
Esempio n. 4
0
        private bool validarNulos()
        {
            bool         flag = true;
            frmException err  = new frmException();

            err.setearUrl("C:\\Users\\Panza\\source\\repos\\josepanz\\sistemaStock\\img\\algoAndaMal.jpg");


            if (txtDescripcion.Text.Trim() == null || txtDescripcion.Text.Trim() == "")
            {
                err.Controls["txtMensaje"].Text = "Debe cargar el valor de la descripcion del motivo";
                txtDescripcion.Focus();
                mostrarForm(err);
                return(flag = false);
            }


            return(flag);
        }
Esempio n. 5
0
        private void SistemaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmException form = new frmException();

            try
            {
                form.setearUrl("C:\\Users\\Panza\\source\\repos\\josepanz\\sistemaStock\\img\\acercaDelSistema.jpg");
                form.Controls["txtMensaje"].Text      = "Sistem Stock Pajaro Osado: Version Alpha 69";
                form.Controls["txtMensaje"].ForeColor = Color.Green;
                try
                {
                    SoundPlayer playError = new SoundPlayer(@"C:\Users\Panza\source\repos\josepanz\sistemaStock\sound\/Todo_el_maldito_sistema_esta_mal.wav");
                    playError.Play();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("no hay audio");
                }
            }
            catch (Exception ex) {
                Console.WriteLine("No se encontro la direccion de la imagen");
            }
            form.Show();
        }
Esempio n. 6
0
        private void BtnAceptar_Click(object sender, EventArgs e)
        {
            frmException form = new frmException();

            this.Close();
        }