private void BtnModificar_Click(object sender, EventArgs e)
        {
            if (TxtCodigo.Text != "" && TxtNombre.Text != "" && TxtApellido.Text != "" && TxtClave.Text != "" && TxtDireccion.Text != "" && CmbEstado.Text != "")
            {
                ClsEEmpleados Eobj = new ClsEEmpleados();
                ClsNEmpleados Nobj = new ClsNEmpleados();
                Eobj.codemp = TxtCodigo.Text;
                Eobj.nomemp = TxtNombre.Text;
                Eobj.apeemp = TxtApellido.Text;
                Eobj.claemp = TxtClave.Text;
                Eobj.diremp = TxtDireccion.Text;
                Eobj.estado = CmbEstado.Text;
                Nobj.MtdActualizarEmpleados(Eobj);
                DgvEmpleados.DataSource = Nobj.MtdListarEmpleados();

                CmbEstado.Enabled = false;
                TxtCodigo.Enabled = true;
                TxtCodigo.Clear();
                TxtNombre.Clear();
                TxtApellido.Clear();
                TxtClave.Clear();
                TxtDireccion.Clear();
                CmbEstado.Text = "Activo";
            }
            else
            {
                MessageBox.Show("Por favor llene todos los campos", "Mensaje");
            }
        }
Exemple #2
0
 private void TxtCodigo_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             DataTable Tabla = new DataTable();
             Tabla = NArticulo.BuscarCodigoVenta(TxtCodigo.Text.Trim());
             if (Tabla.Rows.Count <= 0)
             {
                 this.MensajeError("No existe artículos con ese código de barras o no tiene Stock.");
             }
             else
             {
                 this.AgregarDetalle(
                     Convert.ToInt32(Tabla.Rows[0][0]),
                     Convert.ToString(Tabla.Rows[0][1]),
                     Convert.ToString(Tabla.Rows[0][2]),
                     Convert.ToInt32(Tabla.Rows[0][4]),
                     Convert.ToDecimal(Tabla.Rows[0][3])
                     );
             }
             TxtCodigo.Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void LimpiarCajitas()
 {
     TxtCodigo.Clear();
     TxtDescripcion.Clear();
     TxtStock.Clear();
     TxtPrecioUnitario.Clear();
 }
        private void BtnModificar_Click(object sender, EventArgs e)
        {
            if (TxtCodigo.Text != "" && TxtNombre.Text != "" && TxtCantidad.Text != "" && TxtPrecio.Text != "" && CmbPlataforma.Text != "" && CmbGenero.Text != "")
            {
                ClsEProductos Eobj = new ClsEProductos();
                ClsNProductos Nobj = new ClsNProductos();
                Eobj.codprod  = TxtCodigo.Text;
                Eobj.nomprod  = TxtNombre.Text;
                Eobj.cantprod = Convert.ToInt32(TxtCantidad.Text);
                Eobj.preprod  = Convert.ToInt32(TxtPrecio.Text);
                Eobj.codplat  = CmbPlataforma.Text;
                Eobj.codgen   = CmbGenero.Text;
                Nobj.MtdActualizarProductos(Eobj);
                DgvProductos.DataSource = Nobj.MtdListarProductos();

                TxtCodigo.Enabled = true;
                TxtCodigo.Clear();
                TxtNombre.Clear();
                TxtCantidad.Clear();
                TxtPrecio.Clear();
                CmbPlataforma.Text       = "";
                CmbGenero.Text           = "";
                CmbNombreGenero.Text     = "";
                CmbNombrePlataforma.Text = "";
            }
            else
            {
                MessageBox.Show("Por favor llene todos los campos", "Mensaje");
            }
        }
Exemple #5
0
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            int suma = 0;

            if (CmbProveedor.Text != "" && CmbNombreProveedor.Text != "" && TxtCodigo.Text != "" && TxtNombre.Text != "" && TxtCantidad.Text != "" && TxtStock.Text != "")
            {
                ClsEProductos Eobj = new ClsEProductos();
                ClsNProductos Nobj = new ClsNProductos();
                Eobj.codprod = TxtCodigo.Text;
                suma         = Convert.ToInt32(TxtCantidad.Text) + Convert.ToInt32(TxtStock.Text);
                if (suma > 99999)
                {
                    MessageBox.Show("La suma supera el stock maximo", "Mensaje");
                }
                else
                {
                    Eobj.cantprod = suma;
                    Nobj.MtdActualizarStockProductos(Eobj);
                    DgvProductos.DataSource = Nobj.MtdListarProductos();

                    TxtCodigo.Clear();
                    TxtNombre.Clear();
                    TxtCantidad.Clear();
                    TxtStock.Clear();
                    TxtBuscar.Clear();
                    CmbNombreProveedor.Text = "";
                    CmbProveedor.Text       = "";
                }
            }
            else
            {
                MessageBox.Show("Por favor llene todos los campos", "Mensaje");
            }
        }
        public void Buscar()
        {
            try
            {
                _otrosSer = new LOtrosServicios {
                    Codigo = int.Parse(TxtCodigo.Text)
                };
                var res = _otrosSer.Buscar(_otrosSer);

                if (res == null)
                {
                    return;
                }
                TxtCodigo.Enabled          = false;
                TxtNombre.Text             = res.Rows[0][3].ToString();
                TxtSerial.Text             = res.Rows[0][5].ToString();
                TxtValorUni.Text           = res.Rows[0][6].ToString();
                CbxProveedor.Text          = res.Rows[0][2].ToString();
                CbxProveedor.SelectedValue = res.Rows[0][1].ToString();
                TxtObservaciones.Text      = res.Rows[0][4].ToString();
                BtnModificar.Enabled       = true;
                BtnGuardar.Enabled         = false;
                Habilitar();
                GridViewOtrosServ.DataSource = res;
            }
            catch (Exception)
            {
                MessageBox.Show("Servicio no existe ", "SmartPrint", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                Inhabilitar();
                BtnGuardar.Enabled = false;
                TxtCodigo.Enabled  = true;
                TxtCodigo.Clear();
            }
        }
Exemple #7
0
        private void Limpiar()
        {
            TxtBuscar.Clear();
            TxtNombre.Clear();
            TxtId.Clear();
            TxtCodigo.Clear();
            PanelCodigo.BackgroundImage = null;
            BtnGuardarCodigo.Enabled    = true;
            TxtPrecioVenta.Clear();
            TxtStock.Clear();
            TxtImagen.Clear();
            PicImagen.Image = null;
            TxtDescripcion.Clear();
            BtnInsertar.Visible   = true;
            BtnActualizar.Visible = false;
            ErrorIcono.Clear();
            this.RutaDestino = "";
            this.RutaOrigen  = "";

            DgvListado.Columns[0].Visible = false;
            BtnActivar.Visible            = false;
            BtnDesactivar.Visible         = false;
            BtnEliminar.Visible           = false;
            ChkSeleccionar.Checked        = false;
        }
Exemple #8
0
 private void limparObjetos()
 {
     TxtCbo.Clear();
     TxtNome.Clear();
     TxtSalario.Clear();
     TxtCodigo.Clear();
     GC.Collect();
 }
 public void LimpiarCajitas()
 {
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtDireccion.Clear();
     TxtRuc.Clear();
     TxtTelefono.Clear();
     TxtEmail.Clear();
 }
Exemple #10
0
 public void LimpiarCajitas()
 {
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtApellido.Clear();
     TxtClave.Clear();
     CmbCargo.SelectedIndex  = -1;
     CmbEstado.SelectedIndex = -1;
     ruta = "";
 }
Exemple #11
0
 private void TxtCodigo_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         insereCarrinho();
         GridCarrinho.Rows.Clear();
         Retorna_Carrinho();
         TxtCodigo.Clear();
     }
 }
Exemple #12
0
 protected void ResetControl()
 {
     TxtDocumento.Clear();
     TxtNombre.Clear();
     TxtInstituto.Clear();
     TxtCorreo.Clear();
     TxtSaldoInicial.Clear();
     TxtCodigo.Clear();
     TxtContraseña.Clear();
 }
Exemple #13
0
 private void limparObjetos()
 {
     TxtCliente.Clear();
     TxtDocumento.Clear();
     TxtLimite.Clear();
     CbEstado.Text = "";
     TxtCodigo.Clear();
     MtxtDataAbertura.Clear();
     GC.Collect();
     TxtCliente.Focus();
 }
 private void BtnNuevo_Click(object sender, EventArgs e)
 {
     CmbEstado.Enabled = false;
     TxtCodigo.Enabled = true;
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtApellido.Clear();
     TxtClave.Clear();
     TxtDireccion.Clear();
     CmbEstado.Text = "Activo";
 }
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     TxtNombre.Clear();
     TxtObservaciones.Clear();
     TxtSerial.Clear();
     TxtValorUni.Clear();
     TxtCodigo.Enabled = true;
     TxtCodigo.Clear();
     btnBuscar.Visible = false;
     Inhabilitar();
     GridViewOtrosServ.DataSource = null;
 }
 private void BtnNuevo_Click(object sender, EventArgs e)
 {
     TxtCodigo.Enabled   = true;
     TxtCantidad.Enabled = true;
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtCantidad.Clear();
     TxtPrecio.Clear();
     CmbPlataforma.Text       = "";
     CmbGenero.Text           = "";
     CmbNombreGenero.Text     = "";
     CmbNombrePlataforma.Text = "";
 }
 private void limparObjetos()
 {
     TxtCodigo.Clear();
     TxtNome.Clear();
     TxtRg.Clear();
     MtbCelular.Clear();
     MtbCpf.Clear();
     MtbDtNasc.Clear();
     MtbFone.Clear();
     CbCargo.Text = string.Empty;
     GC.Collect();
     TxtNome.Focus();
 }
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            if (TxtCodigo.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Codigo Es Requerido.");
                TxtCodigo.Focus();
                return;
            }
            if (TxtProducto.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Decripción Es Requerido.");
                TxtProducto.Focus();
                return;
            }
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Cantidad Es Requerido.");
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecioU.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Precio Unitario Es Requerido.");
                TxtPrecioU.Focus();
                return;
            }

            DataGridViewRow fila = new DataGridViewRow();

            fila.CreateCells(DgvFactura);
            fila.Cells[0].Value = TxtCodigo.Text.Trim();
            fila.Cells[1].Value = TxtProducto.Text.Trim();
            fila.Cells[2].Value = TxtCantidad.Text.Trim();
            fila.Cells[3].Value = TxtPrecioU.Text.Trim();

            double prec, cant;

            prec = Convert.ToDouble(TxtPrecioU.Text.Trim());
            cant = Convert.ToDouble(TxtCantidad.Text.Trim());

            fila.Cells[4].Value = POO.precU(prec, cant).ToString();

            DgvFactura.Rows.Add(fila);

            TxtCodigo.Clear();
            TxtProducto.Clear();
            TxtCantidad.Clear();
            TxtPrecioU.Clear();
            TxtCodigo.Focus();
        }
Exemple #19
0
 private void BtnLimpia_Click(object sender, EventArgs e)
 {
     TxtApellido.Clear();
     TxtQueryID.Clear();
     MTxtCedula.Clear();
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtUser.Clear();
     TxtQueryNombre.Clear();
     TxtTelefono.Clear();
     TxtUser.Clear();
     TxtConfirmar.Clear();
     TxtContrasena.Clear();
 }
 public void Clear()//Método para limpiar
 {
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtUsuario.Clear();
     TxtContraseña.Clear();
     TxtConfirmar.Clear();
     TxtConfirmar.Visible = false;
     LblConfirmar.Visible = false;
     Inhabilitar();
     TxtCodigo.Enabled      = true;
     CbxEstado.SelectedItem = null;
     CbxPerfil.SelectedItem = null;
     MostrarTodos();
     BtnGuardar.Enabled   = false;
     BtnModificar.Enabled = false;
 }
Exemple #21
0
 private void LipiarControlesArticulo()
 {
     TxtCodigo.Clear();
     TxtDescripcion.Clear();
     TxtPrecioCompra.Text    = "0.00";
     TxtPrecioVenta.Text     = "0.00";
     TxtGananciaObtener.Text = "0.00";
     TxtTotalInventario.Text = "0";
     TxtIvaUnitario.Text     = "0.00";
     TxtCantidadVendido.Text = "0";
     TxtCantidadMinimo.Text  = "0";
     TxtCantidadMaximo.Text  = "0";
     TxtUnidadVenta.Clear();
     TxtCantidad.Text            = "0";
     DtpFecheVencimiento.MinDate = DateTime.Now.AddDays(5);
     TxtCodigo.Focus();
 }
Exemple #22
0
        public void LimparCampos()
        {
            TxtDescricao.Clear();
            TxtCodigo.Clear();

            foreach (Control ctrl in groupBox2.Controls)
            {
                if (ctrl is CheckBox)
                {
                    CheckBox ckb = (CheckBox)ctrl;

                    if (ckb.Checked)
                    {
                        ckb.Checked = false;
                    }
                }
            }
        }
        private void Limpiar()
        {
            TxtBuscar.Clear();
            TxtId.Clear();
            TxtCodigo.Clear();
            TxtIdCliente.Clear();
            TxtNombreCliente.Clear();
            TxtSerieComprobante.Clear();
            TxtNumComprobante.Clear();
            DtDetalle.Clear();
            TxtSubtotalI.Text     = "0.00";
            TxtTotalImpuesto.Text = "0.00";
            TxtTotal.Text         = "0.00";

            DgvListado.Columns[0].Visible = false;
            BtnAnular.Visible             = false;
            ChkSeleccionar.Checked        = false;
        }
Exemple #24
0
 private void ChkbAgranel_CheckedChanged(object sender, EventArgs e)
 {
     if (ChkbAgranel.Checked)
     {
         LblCodigo.Visible         = false;
         TxtCodigo.Visible         = false;
         LblTipoAgranel.Visible    = true;
         CmbFamiliaAgranel.Visible = true;
         TxtCodigo.Clear();
     }
     else
     {
         LblCodigo.Visible         = true;
         TxtCodigo.Visible         = true;
         LblTipoAgranel.Visible    = false;
         CmbFamiliaAgranel.Visible = false;
         TxtCodigo.Clear();
     }
 }
        private void BtnModificar_Click(object sender, EventArgs e)
        {
            if (TxtCodigo.Text != "" && TxtNombre.Text != "")
            {
                ClsEPlataforma Eobj = new ClsEPlataforma();
                ClsNPlataforma Nobj = new ClsNPlataforma();
                Eobj.codplat = TxtCodigo.Text;
                Eobj.nomplat = TxtNombre.Text;
                Nobj.MtdActualizarPlataforma(Eobj);
                DgvPlataforma.DataSource = Nobj.MtdListarPlataforma();

                TxtCodigo.Enabled = true;
                TxtCodigo.Clear();
                TxtNombre.Clear();
            }
            else
            {
                MessageBox.Show("Por favor llene todos los campos", "Mensaje");
            }
        }
        public void Clear()//Método para limpiar
        {
            TxtCodigo.Clear();
            TxtCodigo.Enabled = false;
            TxtNombre.Clear();
            TxtObservaciones.Clear();
            TxtSerial.Clear();
            TxtValorUni.Clear();
            CbxProveedor.Text = "";
            Habilitar();
            BtnGuardar.Enabled           = true;
            BtnModificar.Enabled         = false;
            btnBuscar.Visible            = true;
            GridViewOtrosServ.DataSource = null;
            MostrarTodos();
            var Aux    = _serv.MostrarCodigo().Rows[0][1];
            int Numeeo = Convert.ToInt32(Aux) + 1;

            TxtCodigo.Text = Numeeo.ToString("D4");
        }
        private void Limpiar()
        {
            TxtNombre.Clear();
            TxtDescripcion.Clear();
            TxtBuscar.Clear();
            TxtId.Clear();
            TxtCodigo.Clear();
            TxtStock.Clear();
            PicImagen.Image = null;
            TxtPrecioVenta.Clear();
            TxtImagen.Clear();
            BtnInsertar.Visible   = true;
            BtnActualizar.Visible = false;
            ErrorIcono.Clear();

            DgvListado.Columns[0].Visible = false;
            BtnActivar.Visible            = false;
            BtnDesactivar.Visible         = false;
            BtnEliminar.Visible           = false;
            ChkSeleccionar.Checked        = false;
        }
Exemple #28
0
 private void LimpiarCajas()
 {
     CmbUnidadVenta.SelectedIndex = 0;
     CmbFabricante.SelectedIndex  = 0;
     TxtCodigo.Clear();
     TxtContenido.Text = "0";
     TxtDescripcion.Clear();
     CmbUnidMed.SelectedIndex  = 0;
     CmbPrestArt.SelectedIndex = 0;
     TxtMarca.Clear();
     TxtNombre.Clear();
     TxtRazon.Clear();
     TxtIdArticulo.Clear();
     TxtRFC.Clear();
     TxtTelefono.Clear();
     TxtDireccion.Clear();
     TxtCorreo.Clear();
     TxtCantidadMaximo.Text       = "0";
     TxtCantidadMinimo.Text       = "0";
     CmbUnidadVenta.SelectedIndex = 0;
     CmbEstatus.SelectedIndex     = 0;
     CmbEmpresa.SelectedIndex     = 0;
     CmbSucursal.DataSource       = null;
 }
 private void BtnNuevo_Click(object sender, EventArgs e)
 {
     TxtCodigo.Enabled = true;
     TxtCodigo.Clear();
     TxtNombre.Clear();
 }
Exemple #30
0
 private void clear()
 {
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtDescipcion.Clear();
 }