Esempio n. 1
0
 public void Set(prd_GrupoTrabajo_Info info)
 {
     try
     {
         CmbSucursal.set_Idsucursal(info.IdSucursal);
         txtareaProduccion.Text = info.AreaProduccion;
         TextNombreGrupo.Text   = info.Descripcion;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
 public void Get()
 {
     try
     {
         Info.IdEmpresa      = param.IdEmpresa;
         Info.IdSucursal     = CmbSucursal.get_sucursal().IdSucursal;
         Info.IdGrupoTrabajo = Info.IdGrupoTrabajo;
         Info.Descripcion    = TextNombreGrupo.Text;
         Info.AreaProduccion = txtareaProduccion.Text;
         Info.Fecha          = DateTime.Now;
         Info.Estado         = "A";
         Info.Usuario        = param.IdUsuario;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 3
0
        private bool ValidarCampos()
        {
            if (ChkbAgranel.Checked == true)
            {
                if (CmbFamiliaAgranel.SelectedIndex == 0)
                {
                    Soporte.MsgError("Seleccione una Categoria del Articulo en Agranel");
                    CmbFamiliaAgranel.Focus();
                    return(false);
                }
            }

            if (TxtCodigo.Visible == true)
            {
                if (TxtCodigo.TextLength < 4)
                {
                    Soporte.MsgError("Ingrese un Codigo del Articulo");
                    TxtCodigo.Focus();
                    return(false);
                }
            }

            if (string.IsNullOrEmpty(TxtNombre.Text))
            {
                Soporte.MsgError("Ingrese una Nombre del Articulo");
                TxtNombre.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtMarca.Text))
            {
                Soporte.MsgError("Ingrese una Marca.");
                TxtMarca.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtDescripcion.Text))
            {
                Soporte.MsgError("Ingrese una Descripcion del Articulo.");
                TxtDescripcion.Focus();
                return(false);
            }
            if (CmbPrestArt.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione una Presentacion del Articulo");
                CmbPrestArt.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(TxtContenido.Text))
            {
                Soporte.MsgError("Ingrese el Contenido del Articulo");
                TxtContenido.Focus();
                return(false);
            }
            if (CmbUnidMed.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione una Unidad de Medina del Articulo");
                CmbUnidMed.Focus();
                return(false);
            }

            if (CmbUnidadVenta.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione Unidad de Medida para la Venta del Articulo");
                CmbUnidadVenta.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(TxtCantidadMinimo.Text))
            {
                Soporte.MsgError("Ingrese un Valor Valido para la cantidad Minimo del Articulo");
                TxtCantidadMinimo.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtCantidadMaximo.Text))
            {
                Soporte.MsgError("Ingrese un Valor Valido para la cantidad Maximo del Articulo");
                TxtCantidadMaximo.Focus();
                return(false);
            }
            if (CmbEstatus.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione un Estatus del Articulo");
                CmbPrestArt.Focus();
                return(false);
            }
            if (CmbFabricante.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione un Fabricante o elige sin Fabricante");
                CmbFabricante.Focus();
                return(false);
            }
            if (CmbEmpresa.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione la Empresa en donde se registrara el Articulo");
                CmbEmpresa.Focus();
                return(false);
            }
            if (CmbSucursal.SelectedIndex == 0)
            {
                Soporte.MsgError("Seleccione la Sucursal en donde se registrara el Articulo");
                CmbSucursal.Focus();
                return(false);
            }

            return(true);
        }
Esempio n. 4
0
        private bool ValidarTextBox()
        {
            if (CmbComprobante.SelectedIndex == 0)
            {
                Soporte.MsgInformacion("Seleccione un comprobante de la compra del Articulo");
                CmbComprobante.Focus();
                return(false);
            }

            if (Convert.ToInt32(CmbEmpresa.SelectedValue) == 0)
            {
                Soporte.MsgInformacion("Seleccione una Empres");
                CmbEmpresa.Focus();
                return(false);
            }

            if (Convert.ToInt32(CmbSucursal.SelectedValue) == 0)
            {
                Soporte.MsgInformacion("Seleccione una Sucursal");
                CmbSucursal.Focus();
                return(false);
            }

            if (Convert.ToInt32(CmbTipEntradas.SelectedValue) == 0)
            {
                Soporte.MsgInformacion("Seleccione un Tipo Entrada");
                CmbTipEntradas.Focus();
                return(false);
            }

            if (CmbProveedores.SelectedIndex == 0)
            {
                Soporte.MsgInformacion("Seleccione un Proveedor del comprobante.");
                CmbProveedores.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtCodigo.Text))
            {
                Soporte.MsgInformacion("Ingrese Codigo del Articulo para poder agregar a la Lista");
                TxtCodigo.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtDescripcion.Text))
            {
                Soporte.MsgInformacion("Busque el Articulo ya que faltan datos para Agregar a la Lista.");
                TxtCodigo.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtCantidad.Text) && TxtCantidad.Text != "0")
            {
                Soporte.MsgInformacion("Ingrese la cantidad del articulo a Ingresar");
                TxtCantidad.Focus();
                return(false);
            }

            if (!Soporte.ValidarFormatoMoneda(TxtCantidad.Text))
            {
                Soporte.MsgInformacion("El formato de la Cantidad no es Valido.");
                TxtCantidad.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtPrecioCompra.Text) && TxtPrecioCompra.Text != "0")
            {
                Soporte.MsgInformacion("Ingrese Precio del articulo");
                TxtPrecioCompra.Focus();
                return(false);
            }

            if (!Soporte.ValidarFormatoMoneda(TxtPrecioCompra.Text))
            {
                Soporte.MsgInformacion("El formato de Precio de Compra no es Valido.");
                TxtPrecioCompra.Focus();
                return(false);
            }

            if (string.IsNullOrEmpty(TxtGananciaObtener.Text) && TxtGananciaObtener.Text != "0")
            {
                Soporte.MsgInformacion("Ingrese la cantidad de la Ganancia a Obtener");
                TxtGananciaObtener.Focus();
                return(false);
            }

            if (!Soporte.ValidarFormatoMoneda(TxtGananciaObtener.Text))
            {
                Soporte.MsgInformacion("El formato de Ganancia a Obtener no es Valido.");
                TxtGananciaObtener.Focus();
                return(false);
            }


            if (Convert.ToInt32(CmbTipEntradas.SelectedValue) == 4)
            {
                if (string.IsNullOrEmpty(TxtNumComprobante.Text) && TxtNumComprobante.MaxLength < 2)
                {
                    Soporte.MsgInformacion("El numero de comprobante no tiene el Formato correcto, revise.");
                    TxtNumComprobante.Focus();
                    return(false);
                }
                if (string.IsNullOrEmpty(TxtTotalArticulos.Text) && TxtTotalArticulos.Text != "0")
                {
                    Soporte.MsgInformacion("Ingrese la cantidad Total del Comprobante");
                    TxtTotalArticulos.Focus();
                    return(false);
                }
                if (!Soporte.ValidarFormatoMoneda(TxtTotalArticulos.Text))
                {
                    Soporte.MsgInformacion("El formato de Total Articulos no es Valido.");
                    TxtTotalArticulos.Focus();
                    return(false);
                }

                if (string.IsNullOrEmpty(TxtMontoTotal.Text) && TxtMontoTotal.Text != "0")
                {
                    Soporte.MsgInformacion("Ingrese el Monto Total del Comprobante");
                    TxtMontoTotal.Focus();
                    return(false);
                }
                if (!Soporte.ValidarFormatoMoneda(TxtMontoTotal.Text))
                {
                    Soporte.MsgInformacion("El formato del Monto Total no es Valido.");
                    TxtMontoTotal.Focus();
                    return(false);
                }
                if (string.IsNullOrEmpty(TxtIvaTotal.Text) && TxtIvaTotal.Text != "0")
                {
                    Soporte.MsgInformacion("Ingrese el Monto Total del Iva");
                    TxtIvaTotal.Focus();
                    return(false);
                }
                if (!Soporte.ValidarFormatoMoneda(TxtIvaTotal.Text))
                {
                    Soporte.MsgInformacion("El formato del Iva Total no es Valido.");
                    TxtIvaTotal.Focus();
                    return(false);
                }
            }
            else
            {
            }



            return(true);
        }