Ejemplo n.º 1
0
        public int EditHerramienta(Herramientas h)
        {
            int res = 0;

            if (h != null)
            {
                //SE CREA UN DATATABLE COMUN Y SE ASIGNA
                //EL RESULTADO DE UNA CONSULTA LINQ
                //CON EL ID DE LA FILA
                DataTable dt = hta.GetData().
                               Where(x => x.Id == h.Id).CopyToDataTable <herramientasRow>();

                //SE CREA UN DATATABLE TIPO DE LA TABLA
                herramientasDataTable hdt = new herramientasDataTable();
                //SE COMBINA LOS DATATABLES PARA FACILITAR EL MANEJO
                hdt.Merge(dt);

                //SE CREA UN DATAROW DEL TIPO DE LA TABLA
                EwoDatabaseDataSet.herramientasRow herRow =
                    hdt.FindById(h.Id);

                //SE ASIGNAN LOS VALORES MODIFICADOS
                herRow.image_path = Path.GetFileName(h.imagen_name);

                //SE EJECUTA LA ACTUALIZACIÓN
                res = hta.Update(herRow);
            }

            return(res);
        }
        public async Task <IActionResult> Edit(string id, [Bind("IdHerramienta,Herramienta,IdEje")] Herramientas herramientas)
        {
            if (id != herramientas.IdHerramienta)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(herramientas);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!HerramientasExists(herramientas.IdHerramienta))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdEje"] = new SelectList(_context.EjeSeleccionado, "IdEje", "IdEje", herramientas.IdEje);
            return(View(herramientas));
        }
Ejemplo n.º 3
0
        private void FrmBusqueda_Load(object sender, EventArgs e)
        {
            gridViewBusqueda.OptionsView.ColumnAutoWidth = AutosizeColumnas;
            Herramientas.LlenarGrid(gridBusqueda, listaBusqueda);
            if (BestFitColumns)
            {
                gridViewBusqueda.BestFitColumns();
            }
            Herramientas.GridViewEditarColumnas(gridViewBusqueda, true, AjustarColumnas, false, ColumnasOcultar, null, ColumnasNoMoneda);
            gridBusqueda.RefreshDataSource();
            gridViewBusqueda.FocusedRowHandle = DevExpress.XtraGrid.GridControl.AutoFilterRowHandle;
            for (int i = 0; i < gridViewBusqueda.Columns.Count; i++)
            {
                if (gridViewBusqueda.Columns[i].Visible)
                {
                    gridViewBusqueda.FocusedColumn = gridViewBusqueda.Columns[i];
                    break;
                }
            }
            gridViewBusqueda.ShowEditor();
            var textedit = ((TextEdit)gridViewBusqueda.ActiveEditor);

            if (textedit != null)
            {
                textedit.Text = "m";
                textedit.Text = "";
            }
        }
Ejemplo n.º 4
0
        private void AltaCliente_Load(object sender, EventArgs e)
        {
            userId = "";

            rbBuscarUser.Checked = true;
            gbAltaUser.Enabled   = false;

            Herramientas.llenarComboBoxSP(cbxPais,
                                          "SARASA.cbx_pais", null,
                                          true);

            Herramientas.llenarComboBoxSP(cbxTipoDoc,
                                          "SARASA.cbx_tipodoc", null,
                                          true);

            Herramientas.llenarComboBoxSP(cbxRol,
                                          "SARASA.cbx_rol",
                                          Herramientas.GenerarListaDeParametros("@usuario_id", 0),
                                          true);

            //Herramientas.GenerarListaDeParametros(
            //    //"@cliId", txtCliente.Text,           //  @cliId integer,
            //    "@cliNombre", txtNombre.Text,        //  @cliNombre nvarchar(255),
            //    "@cliApellido", txtApellido.Text,    //  @cliApellido nvarchar(255),
            //    "@cliTipoDocId", cbxTipoDoc.SelectedItem.ToString(), //  @cliTipoDocId integer,
            //    "@cliNumDoc", txtNumDoc.Text,       //  @cliNumDoc numeric(18,0)
            //    "@cliMail", txtMail.Text,           //  @cliMail nvarchar(255)
            //    "@cliPaisId", cbxPais.SelectedItem.ToString(),      //  @cliPaisId integer,
            //    "@cliDomCalle", txtCalle.Text,      //  @cliCalle nvarchar(255),
            //    "@cliDomNumero", txtCalleNum.Text,  //  @cliDomNumero numeric(18,0),
            //    "@cliDomPiso", txtPiso.Text,        //  @cliDomPiso numeric(18,0),
            //    "@cliDomDpto", txtDepto.Text,       //  @cliDomDpto nvarchar(10),
            //    "@cliFechaNac", dtpFechaNac,        //  @cliFechaNac datetime,
            //    "@cliHabilitado", chkEstado.Checked);    // @cliHabilitado bit);
        }
Ejemplo n.º 5
0
    public override void Interactuar(Vector2 posicionPersonaje)
    {
        Vector2 direccionPersonaje = Herramientas.ObtenerDireccion(transform.position, posicionPersonaje);

        MirarPersonaje(direccionPersonaje);
        MostrarDialogo();
    }
Ejemplo n.º 6
0
        //  Modificar Cliente
        private void btnModificar_Click(object sender, EventArgs e)
        {
            Cliente cliente = new Cliente();

            cliente.ClienteId = dataGridView1.SelectedCells[0].Value.ToString();

            if (cliente.ClienteId != "")
            {
                cliente.Nombre   = dataGridView1.SelectedCells[3].Value.ToString();
                cliente.Apellido = dataGridView1.SelectedCells[4].Value.ToString();
                cliente.Mail     = dataGridView1.SelectedCells[5].Value.ToString();

                cliente.TipoDocId = dataGridView1.SelectedCells[17].Value.ToString();
                cliente.NumeroDoc = dataGridView1.SelectedCells[7].Value.ToString();

                cliente.PaisId    = dataGridView1.SelectedCells[16].Value.ToString();
                cliente.DomCalle  = dataGridView1.SelectedCells[18].Value.ToString();
                cliente.DomNumero = dataGridView1.SelectedCells[19].Value.ToString();
                cliente.DomPiso   = dataGridView1.SelectedCells[20].Value.ToString();
                cliente.DomDpto   = dataGridView1.SelectedCells[21].Value.ToString();

                cliente.FechaNacimiento = dataGridView1.SelectedCells[8].Value.ToString();
                cliente.Habilitado      = bool.Parse(dataGridView1.SelectedCells[11].Value.ToString());
            }
            else
            {
                Herramientas.msebox_informacion("SIN CLIENTE ASOCIADO, ClienteId: " + cliente.ClienteId);
            }

            ABM_Cliente.FormModificar frmModificar = new ABM_Cliente.FormModificar(this, usuario, cliente);
            this.Hide();
            frmModificar.Show();
        }
Ejemplo n.º 7
0
    public void MostrarDetallesPokemon(PokemonModelo pokemonDatos)
    {
        gameObject.SetActive(true);
        UIControlador.Instancia.DetallesPokemon.imagen.sprite = pokemonDatos.DatosFijos.sprite;
        UIControlador.Instancia.DetallesPokemon.nombre.text   = pokemonDatos.DatosFijos.nombre;
        string ele = string.Empty;

        if (pokemonDatos.DatosFijos.tipoElemento1 != Elemento.NINGUNO)
        {
            ele = Herramientas.TextoAtaqueElemento(pokemonDatos.DatosFijos.tipoElemento1);
        }
        if (pokemonDatos.DatosFijos.tipoElemento2 != Elemento.NINGUNO)
        {
            ele = string.Concat(ele, " ", Herramientas.TextoAtaqueElemento(pokemonDatos.DatosFijos.tipoElemento2));
        }
        UIControlador.Instancia.DetallesPokemon.elementos.text = ele;

        UIControlador.Instancia.DetallesPokemon.ataques1.MostrarAtaque(pokemonDatos.Ataques()[0], pokemonDatos);
        UIControlador.Instancia.DetallesPokemon.ataques2.MostrarAtaque(pokemonDatos.Ataques()[1], pokemonDatos);
        UIControlador.Instancia.DetallesPokemon.ataques3.MostrarAtaque(pokemonDatos.Ataques()[2], pokemonDatos);
        UIControlador.Instancia.DetallesPokemon.ataques4.MostrarAtaque(pokemonDatos.Ataques()[3], pokemonDatos);

        UIControlador.Instancia.DetallesPokemon.salud.text         = pokemonDatos.EstadisticaSaludMaxima().ToString();
        UIControlador.Instancia.DetallesPokemon.ataqueFisico.text  = pokemonDatos.EstadisticaAtaqueFisico().ToString();
        UIControlador.Instancia.DetallesPokemon.defensaFisica.text = pokemonDatos.EstadisticaDefensaFisica().ToString();
        UIControlador.Instancia.DetallesPokemon.ataqueMagico.text  = pokemonDatos.EstadisticaAtaqueMagico().ToString();
        UIControlador.Instancia.DetallesPokemon.defensaMagica.text = pokemonDatos.EstadisticaDefensaMagica().ToString();
        UIControlador.Instancia.DetallesPokemon.velocidad.text     = pokemonDatos.EstadisticaVelocidad().ToString();
    }
Ejemplo n.º 8
0
        public void listar_repositorio()
        {
            try
            {
                Herramientas her = new Herramientas();

                Image imagen_pdf = Image.FromFile(@"" + her.GetResourcesPath4() + "\\pdf.png");
                Image imagen_xml = Image.FromFile(@"" + her.GetResourcesPath4() + "\\xml.png");

                lista_repositorio = new List <clsRepositorio>();
                lista_repositorio = clsadmrepo.listar_repositorio(estado, frmLogin.iCodSucursal, frmLogin.iCodAlmacen);

                if (lista_repositorio != null)
                {
                    if (lista_repositorio.Count > 0)
                    {
                        dg_documentos.Rows.Clear();
                        foreach (clsRepositorio rep in lista_repositorio)
                        {
                            dg_documentos.Rows.Add(rep.Repoid, rep.Tipodoc, rep.Fechaemision, rep.Serie,
                                                   rep.Correlativo, rep.Monto, rep.Estadosunat, rep.Mensajesunat,
                                                   imagen_pdf, imagen_xml, rep.Nombredoc, rep.Usuario, rep.Fechaemision);
                        }
                    }
                    totaldocs.Text = lista_repositorio.Count.ToString();
                }
                else
                {
                    dg_documentos.Rows.Clear();
                }
            }
            catch (Exception e) { MessageBox.Show(e.Message); }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// MÉTODO PARA ACTUALIZAR AL CLIENTE
        /// </summary>
        private void Actualizar()
        {
            int IDUsuarioActual = 0;

            int.TryParse(((Usuarios)Session["Usuario"]).Id.ToString(), out IDUsuarioActual);
            //PROMOTOR
            int ID = int.Parse(Request.QueryString["id"].ToString());

            App_Code.Entidades.Clientes Cliente = new App_Code.Entidades.Clientes
            {
                Id        = ID,
                IdUsuario = IDUsuarioActual
            };
            Cliente.ConsultarID();
            ClienteFormulario(Cliente);
            Cliente.Actualizar();
            //REDES SOCIALES DEL CLIENTE
            GuardarRedSocial(Cliente.Id, 3, 1, tb_Facebook.Text);
            GuardarRedSocial(Cliente.Id, 3, 2, tb_Twitter.Text);
            GuardarRedSocial(Cliente.Id, 3, 3, tb_Instagram.Text);
            //DOCUMENTOS DEL CLIENTE
            GuardarDocumentos(Cliente.Id, 3, 1, fu_ActaNacimiento.FileName);
            GuardarDocumentos(Cliente.Id, 3, 2, fu_INE.FileName);
            GuardarDocumentos(Cliente.Id, 3, 3, fu_CURP.FileName);
            GuardarDocumentos(Cliente.Id, 3, 4, fu_ConstanciaResidencia.FileName);
            GuardarDocumentos(Cliente.Id, 3, 5, fu_ComprobanteDomicilio.FileName);
            GuardarDocumentos(Cliente.Id, 3, 6, fu_ComprobanteIngresos.FileName);

            Session["Alerta"] = Herramientas.Alerta("Operación existosa!", "Cliente actualizado correctamente.", 3);
            Response.Redirect("Listado.aspx");
        }
Ejemplo n.º 10
0
        //Solo los administradores pueden dar de alta
        protected void btnAltaOfi_Click(object sender, EventArgs e)
        {
            string desc           = txtDesc.Text;
            string calle          = txtCalle.Text;
            string campoNroPuerta = txtNroPuerta.Text;
            string codPost        = txtCP.Text;
            string ciudad         = txtCiudad.Text;
            string pais           = txtPais.Text;

            if (desc != "" && calle != "" && campoNroPuerta != "" && Herramientas.esNumero(campoNroPuerta) && codPost != "" && ciudad != "" && pais != "")
            {
                int  nroPuertaResult;
                bool resultNroPuerta = int.TryParse(this.txtNroPuerta.Text, out nroPuertaResult);
                int  nroPuerta       = nroPuertaResult;

                if (Controladora.Instancia.AltaOficina(calle, nroPuerta, codPost, ciudad, pais, desc))
                {
                    lblMensaje.Text = "Oficina dada de alta";
                }
                else
                {
                    lblMensaje.Text = "La direccion ya se encuentra registrada";
                    this.LimpiarCampos();
                }
            }
        }
Ejemplo n.º 11
0
    private TipoColision DetectarPersonajeADistancia(Vector2 direccion, int distanciaRayoEnNumeroDeCasillas = 0)
    {
        float distanciaRayoFinal = Ajustes.Instancia.tamanioCasilla;

        if (distanciaRayoEnNumeroDeCasillas > 1)
        {
            distanciaRayoFinal = Ajustes.Instancia.tamanioCasilla * distanciaRayoEnNumeroDeCasillas;
        }

        RaycastHit2D[] colisiones = Physics2D.RaycastAll(transform.position, direccion, distanciaRayoFinal);
        if (colisiones != null && colisiones.Length > 0)
        {
            for (int i = 0; i < colisiones.Length; i++)
            {
                if (colisiones[i].collider.gameObject != gameObject)
                {
                    if (Herramientas.LayerSonIguales(colisiones[i].collider.gameObject.layer, Ajustes.Instancia.layerColision))
                    {
                        return(TipoColision.ObjetoColision);
                    }
                    else if (colisiones[i].collider.gameObject.CompareTag(Ajustes.Instancia.tagPersonaje))
                    {
                        return(TipoColision.Personaje);
                    }
                }
            }
        }
        return(TipoColision.NINGUNO);
    }
Ejemplo n.º 12
0
        /// <summary>
        /// EVENTO PARA ELIMINAR EL GRUPO
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void bEliminar_Click(object sender, EventArgs e)
        {
            int IDUsuarioActual = 0;

            int.TryParse(((Usuarios)Session["Usuario"]).Id.ToString(), out IDUsuarioActual);
            Button boton = (Button)sender;
            int    id    = int.Parse(boton.CommandArgument);

            App_Code.Entidades.Grupos Grupo = new App_Code.Entidades.Grupos
            {
                Id        = id,
                IdUsuario = IDUsuarioActual
            };
            Grupo.ConsultarID();
            Grupo.IdEstatus = 2;
            Grupo.Actualizar();
            Literal literal = (Literal)Master.FindControl("lAlerta");

            if (Grupo.Id != 0)
            {
                literal.Text = Herramientas.Alerta("Operación existosa!", "Grupo eliminado correctamente.", 3);
            }
            else
            {
                literal.Text = Herramientas.Alerta("Ocurrió un error!", "No ha sido posible eliminar al grupo.", 4);
            }
            CargarGrid();
        }
Ejemplo n.º 13
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Herramientas.llenarComboBoxSP(cbxRol,
                                   "SARASA.cbx_rol",
                                   Herramientas.GenerarListaDeParametros("@usuario_id", 0),
                                   true);
 }
Ejemplo n.º 14
0
        private void EncodePeFI()
        {
            String ImgZon = Herramientas.encodeImagen(imgZonaCuerpo);

            strCitas.ZonaCuerpo = ImgZon;
            //  File.Delete(imgZonaCuerpo);
        }
Ejemplo n.º 15
0
        private void printaFactura(string nomdocumento)
        {
            try
            {
                Herramientas herramientas = new Herramientas();

                var informe = herramientas.GetResourcesPath3();

                CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

                rd.Load(informe + "\\" + nomdocumento + ".pdf");


                CrystalDecisions.CrystalReports.Engine.PrintOptions rptoption = rd.PrintOptions;
                rptoption.PrinterName = "\\\\192.168.1.35\\EPSON LX-350 ESC/P";
                rptoption.PaperSize   = (CrystalDecisions.Shared.PaperSize)GetIDPaperSize("\\\\192.168.1.35\\EPSON LX-350 ESC/P", "A4");//(CrystalDecisions.Shared.PaperSize)ext.GetIDPaperSize(Convert.ToString(System.Drawing.Printing.PrinterSettings.InstalledPrinters[3]), "documentoFioviza");

                rd.PrintToPrinter(1, false, 1, 1);

                rd.Close();
                rd.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Se encontro el siguiente problema" + ex.Message, "Venta", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 16
0
    private void NPCDetectaJugador(EventoBase mensaje)
    {
        EventoPersonajeMirarDireccion e = (EventoPersonajeMirarDireccion)mensaje;

        siguienteDireccion = Herramientas.ObtenerDireccion(contenedorTransform.position, e.PosicionObjetivo);
        AsignarAnimacion();
        DetenerAnimacion();
    }
Ejemplo n.º 17
0
 private void lbxRoles_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lbxRoles.SelectedItem != null)
     {
         lbxFunciones.Items.Clear();
         Herramientas.llenarListBoxFuncionesSistema(lbxFunciones, ((ItemRol)lbxRoles.SelectedItem).Id, "Buscar");
     }
 }
Ejemplo n.º 18
0
        public void IniciarSesionCuentaNoExistentePrueba()
        {
            string usuario     = "Test2";
            string contrasenia = Herramientas.CifrarConSHA512("12345");

            Cuenta.IniciarSesion(usuario, contrasenia, (cuenta) => {
                Assert.IsFalse(cuenta != null);
            });
        }
Ejemplo n.º 19
0
        public void GenerateCardModel()
        {
            List <M_EquipoHerramienta> equipoherramienta = new List <M_EquipoHerramienta>();
            string UsuarioID     = Convert.ToString(Application.Current.Properties["IdUsuarioResp"]);
            string zonaID        = Convert.ToString(Application.Current.Properties["ZonaID"]);
            string Clasificacion = "43D6B390-6323-4A64-B6E5-44E2C2E0B2BF";

            try
            {
                string         URlService = RestService.Authority + Methods.Inventariotrimestral + "ZonaID=" + zonaID + "&ClasificacionId=" + Clasificacion + "&UsuarioID=" + UsuarioID;
                HttpWebRequest request    = WebRequest.Create(URlService) as HttpWebRequest;

                string          resp;
                HttpWebResponse response = request.GetResponse() as HttpWebResponse;
                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                {
                    resp = reader.ReadToEnd();
                    var    obj  = JsonConvert.DeserializeObject <object>(resp);
                    string data = Convert.ToString(obj);
                    List <M_EquipoHerramienta> Observable = JsonConvert.DeserializeObject <List <M_EquipoHerramienta> >(data);
                    aprobacion = new ObservableCollection <M_EquipoHerramienta>(Observable);
                    foreach (var item in aprobacion)
                    {
                        var cardDataAprobaciones = new M_EquipoHerramienta()
                        {
                            Codigo = item.
                                     Codigo,
                            Descripcion = item.
                                          Descripcion,
                            DescUnidad = $"Unidad: {item.DescUnidad}",
                            Cantidad   = item.
                                         Cantidad,
                            MInventarioEstadoID = item.MInventarioEstadoID,
                            InventarioID        = item.InventarioID
                        };
                        CardDataCollection.Add(cardDataAprobaciones);
                        var todo = new Herramientas()
                        {
                            Codigo = item.
                                     Codigo,
                            Descripcion = item.
                                          Descripcion,
                            DescUnidad = $"Unidad: {item.DescUnidad}",
                            Cantidad   = item.
                                         Cantidad,
                            MInventarioEstadoID = item.MInventarioEstadoID,
                            InventarioID        = item.InventarioID
                        };
                        _DbHerramientas.CreateItem(todo);
                    }
                }
            }
            catch (Exception ex)
            {
                //DependencyService.Get<IMessage>().ShortAlert(ex.Message);
            }
        }
Ejemplo n.º 20
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            btnModificar.Enabled = false;
            btnEliminar.Enabled  = false;


            lblEstadoBusqueda.Text = "Ejecutando busqueda...";

            //  ARMA LA QUERY A EJECUTAR BASADO EN LOS FILTROS
            string queryConsulta;

            if (tipoFormBusqueda.Equals("BuscarUsuario")) //  Busca usuarios sin clientes asociados
            {
                queryConsulta = Filtros.filtroBuscarUsuario(txtUsuario.Text, "" + ((KeyValuePair <string, string>)cbxRol.SelectedItem).Key, true);
            }
            else
            {
                queryConsulta = Filtros.filtroBuscarUsuario(txtUsuario.Text, "" + ((KeyValuePair <string, string>)cbxRol.SelectedItem).Key, false);
            }


            Herramientas.msebox_informacion(queryConsulta);

            DataTable resultados;

            try
            {
                resultados = Herramientas.ejecutarConsultaTabla(queryConsulta);
                dataGridView1.DataSource = resultados;

                //dataGridView1.Columns["Cliente ID"].Visible = false;
                //dataGridView1.Columns["User ID"].Visible = false;
                //dataGridView1.Columns["Pais ID"].Visible = false;
                //dataGridView1.Columns["Tipo Doc ID"].Visible = false;
                //dataGridView1.Columns["Calle"].Visible = false;
                //dataGridView1.Columns["Numero"].Visible = false;
                //dataGridView1.Columns["Piso"].Visible = false;
                //dataGridView1.Columns["Dpto"].Visible = false;
                //dataGridView1.Columns["Pregunta Sec"].Visible = false;


                lblEstadoBusqueda.Text = "Se encontraron " + dataGridView1.RowCount + " filas";

                if (dataGridView1.RowCount > 0)
                {
                    btnEliminar.Enabled  = true;
                    btnModificar.Enabled = true;
                    btnCrear.Enabled     = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString());
                lblEstadoBusqueda.Text = "Error al realizar la busqueda";
            }
        }
Ejemplo n.º 21
0
        public void setClienteEncontrado(string clienteId, string nombre, string apellido, string documento)
        {
            txtCliente.Text       = apellido + ", " + nombre + " (" + clienteId + ")";
            this.clienteId        = clienteId;
            this.clienteDocumento = documento;

            cbxCuenta.DataSource = null;

            Herramientas.llenarComboBoxSP(cbxCuenta, "SARASA.cbx_cuenta", Herramientas.GenerarListaDeParametros("@Cliente_Id", this.clienteId, "@Estado_Desc", "Habilitada"), true);
        }
Ejemplo n.º 22
0
        //Si la ci no es nula y no tiene letra, es ci valida
        public static bool CiValida(string pCi)
        {
            bool retorno = false;

            if (pCi != "" && Herramientas.esNumero(pCi))
            {
                retorno = true;
            }
            return(retorno);
        }
 private void CargarFirma()
 {
     if (strClientes.Firma != "")
     {
         ptbFirma.Image = Herramientas.decodeImagen(strClientes.Firma, ".png");
     }
     else
     {
     }
 }
Ejemplo n.º 24
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            bool codSeguridadOK = false, fechasOk = false;

            string msj = "Seguro que quiere MODIFICAR la información de la TARJERTA " +
                         tarjeta.Descripcion + "(" + tarjeta.Emisor + ")\n" +
                         "del Cliente: " + txtCliente.Text + "?";


            if (Herramientas.IsNumeric(txtCodSeguridad.Text))
            {
                codSeguridadOK            = true;
                lblCodSeguridad.ForeColor = Color.Black;
            }
            else
            {
                codSeguridadOK            = false;
                lblCodSeguridad.ForeColor = Color.Red;
            }


            if (dtpFechaEmision.Value.ToShortDateString().Equals(dtpFechaVencimiento.Value.ToShortDateString()))
            {// EMISION Y VENCIMIENTO IGUALES, ERROR AL GUARDAR
                //   Utils.Herramientas.msebox_informacion("Existen valores inválidos: " + dtpFechaEmision.Value.ToShortTimeString() + "=" + dtpFechaVencimiento.Value.ToShortTimeString());
                fechasOk = false;
                lblFechaEmision.ForeColor     = Color.Red;
                lblFechaVencimiento.ForeColor = Color.Red;
            }
            else
            {
                fechasOk = true;
                lblFechaEmision.ForeColor     = Color.Black;
                lblFechaVencimiento.ForeColor = Color.Black;
            }

            if (fechasOk && codSeguridadOK)
            {
                var result = MessageBox.Show(msj, "Desasociar tarjeta",
                                             MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);//, MessageBoxDefaultButton.Button2);

                if (result == DialogResult.OK)
                {
                    List <SqlParameter> lista = Utils.Herramientas.GenerarListaDeParametros(
                        "@cliente_id", this.tarjeta.ClienteId,
                        "@tc_num", this.tarjeta.Numero,
                        "@tc_emision", dtpFechaEmision.Value.ToShortDateString(),
                        "@tc_vencimiento", dtpFechaVencimiento.Value.ToShortDateString(),
                        "@tc_codseg", txtCodSeguridad.Text,
                        "@tc_emisor", cbxEmisor.Text);
                    Herramientas.EjecutarStoredProcedure("SARASA.Modificar_Tarjeta", lista);
                }
                this.Dispose();
                this.formPadre.Show();
            }
        }
Ejemplo n.º 25
0
        public int AddHerramienta(Herramientas h)
        {
            int res = 0;

            if (h != null)
            {
                res = hta.Insert(h.herramienta, h.tipo, h.imagen_name);
            }

            return(res);
        }
Ejemplo n.º 26
0
        private void FormCrear_Load(object sender, EventArgs e)
        {
            pasoCrear       = 1;
            txtCliente.Text = clienteDesc;
//            dtpFechaApertura.Value = DateTime.Now;
            dtpFechaApertura.Value = DateTime.Parse(usuario.Fecha);

            Herramientas.llenarComboBoxSP(cbxPais, "SARASA.cbx_pais", null, true);
            Herramientas.llenarComboBoxSP(cbxTipoCta, "SARASA.cbx_tipocta", null, true);
            Herramientas.llenarComboBoxSP(cbxMoneda, "SARASA.cbx_moneda", null, true);
        }
Ejemplo n.º 27
0
        /**
         * Inserción de Texto en area de dibujo
         */
        private void TextoButton_Click(object sender, EventArgs e)
        {
            herrSeleccionada = Herramientas.Texto;


            if (fontDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                estiloFuente = fontDialog1.Font;
                colorFuente  = fontDialog1.Color;
            }
        }
Ejemplo n.º 28
0
 private void DTImagenesTatto()
 {
     dtImagenesTatto.Columns.Add("idImagenTattoo", typeof(int));
     dtImagenesTatto.Columns.Add("ImagenTattoo", typeof(string));
     dtImagenesTatto.Columns.Add("ELIMINADO", typeof(bool));
     for (int i = 0; i < imgList.Count; i++)
     {
         String imgTAT = Herramientas.encodeImagen(imgList[i]);
         dtImagenesTatto.Rows.Add(0, imgTAT, 0);
     }
 }
Ejemplo n.º 29
0
    private IEnumerator MostrarPantallaDeCarga(EventoTeletransportarse e)
    {
        estaTeletransportandose = true;
        yield return(StartCoroutine(CorrutinasComunes.AlfaDeCeroAUno(UIControlador.Instancia.Teletransportador.pantallaDeCarga)));

        Personaje.TeletransportarPersonaje.CambiarPosicion(e.Destino, Herramientas.ObtenerDireccion(e.DireccionMirar));
        yield return(new WaitForSeconds(0.3f));

        yield return(StartCoroutine(CorrutinasComunes.AlfaDeUnoACero(UIControlador.Instancia.Teletransportador.pantallaDeCarga)));

        estaTeletransportandose = false;
    }
Ejemplo n.º 30
0
 private void CargarFirma(string Firma)
 {
     if (Firma != "")
     {
         //openFileDialog1.FileName = Firma;
         // ptbFirma.Image = Image.FromFile(openFileDialog1.FileName);
         ptbFirma.Image = Herramientas.decodeImagen(DireccionFirma, ".png");
     }
     else
     {
     }
 }