protected void btnCrearSitio_Click(object sender, EventArgs e) { try { //obenter modelo tbl_ConfigSitio site = new tbl_ConfigSitio(); tbl_RegistroSitio reg = new tbl_RegistroSitio(); site.vchClaveSitio = txtClaveSitio.Text; site.vchnombreSitio = txtNombreSitio.Text; site.vchAETitle = "AE" + txtClaveSitio.Text; site.bitActivo = true; reg.vchNombreCliente = txtNombreContacto.Text; reg.vchEmail = txtEmail.Text; //reg.vchpassword = Security.Decrypt(txtPassSitio.Text); reg.vchNumeroContacto = txtNumContacto.Text; reg.vchVendedor = txtVendedor.Text; reg.bitActivo = true; //validar SItio bool valido = false; valido = NapoleonDA.validarSitio(site.vchClaveSitio); if (valido) { if (site != null && reg != null) { clsMensaje response = new clsMensaje(); response = NapoleonDA.setSitio(site, reg); if (response.valido) { enableClean(false); ShowMessage("El Sitio " + txtClaveSitio.Text + " se reservó correctamente", MessageType.Correcto, "alert_container"); } else { ShowMessage("Existe un error:" + response.vchMensaje, MessageType.Informacion, "alert_container"); } } else { ShowMessage("Favor de verificar la información.", MessageType.Informacion, "alert_container"); } } else { ShowMessage("La clave para el sitio ya existe, favor de verificar.", MessageType.Informacion, "alert_container"); } //almacenar Sitio } catch (Exception eCS) { ShowMessage("Existe un error al crear el sitio: " + eCS.Message, MessageType.Error, "alert_container"); Log.EscribeLog("Existe un error al crear el sitio: " + eCS.Message); } }
/// <summary> /// Añade un mensaje al listado de mensajes de una partida. /// Llama al método addMensajeToChat de todos los clientes del grupo. /// </summary> /// <param name="mensaje">mensaje a añadir</param> /// <param name="nombreGrupo">nombre del grupo donde hay que añadir el mensaje</param> public void sendMensaje(clsMensaje mensaje, string nombreGrupo) { clsPartida partida = obtenerPartidaPorNombreSala(nombreGrupo); if (partida != null) { partida.ListadoMensajes.Add(mensaje); Clients.Group(nombreGrupo).addMensajeToChat(mensaje); //Clients.All.addMensajeToChat(mensaje); } }
public clsPantallaLobbyVM() { ElementSoundPlayer.State = ElementSoundPlayerState.On; ElementSoundPlayer.Volume = 1; Message = new clsMensaje(); SignalR(); buscarPartida = new Comando(entrarEnCola, () => selectedCategory != null && NombreUsuario != "" && NombreUsuario != null); sendMessage = new Comando(executeSendMessage, canExecuteSendMessage); }
/// <summary> /// Muestra mensaje /// </summary> /// <param name="nombre"></param> /// <param name="mensaje"></param> private async void OnMessage(string nombre, string mensaje) { await Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { clsMensaje objMensaje = new clsMensaje(); //mensaje que te envían otros usuarios objMensaje.name = nombre; objMensaje.message = mensaje; //Hago el listado con el mesaje obtenido //listView ListaMensajes.Add(objMensaje); }); }
protected void btnChange_Click(object sender, EventArgs e) { try { lblMensajePass.Text = ""; if (Security.Encrypt(txtPassActual.Text) == user.vchPassword) { if (Security.Encrypt(txtPassNueva.Text) != user.vchPassword) { if (Security.Encrypt(txtPassNueva.Text) == Security.Encrypt(txtPassNueva1.Text)) { clsMensaje response = new clsMensaje(); response = NapoleonDA.updatePassword(user.intUsuarioID, Security.Encrypt(txtPassNueva.Text), false); if (response != null) { if (response.valido) { lblLogin.ForeColor = System.Drawing.Color.DarkGreen; lblLogin.Text = "Cambios correctos"; mdlChangePass.Hide(); } else { lblMensajePass.Text = "Verificar: " + response.vchMensaje; } } else { lblMensajePass.Text = "Verificar la información"; } } else { lblMensajePass.Text = "Las contraseñas no coindice."; } } else { lblMensajePass.Text = "Capturar una contraseña diferente."; } } else { lblMensajePass.Text = "La contraseña actual no es correcta."; } } catch (Exception eChange) { Log.EscribeLog("Existe un error en btnChange_Click: " + eChange.Message); } }
private void btnBuscarCuenta_Click(object sender, EventArgs e) { AccionBotonAplastado = "B"; clsMensaje objMensaje = new clsMensaje(); clsDatosCuentaBancaria objDatosCuentaBancaria = new clsDatosCuentaBancaria(); clsDatosBanco objDatosBanco = new clsDatosBanco(); clsDatosPersonaCXC objDatosPersona = new clsDatosPersonaCXC(); String[] NombresColumnas = new String[8]; NombresColumnas[0] = "ID Empresa"; NombresColumnas[1] = "ID Cuenta Bancaria"; NombresColumnas[2] = "Banco"; NombresColumnas[3] = "Titular"; NombresColumnas[4] = "Numero de Cuenta"; NombresColumnas[5] = "Tipo"; NombresColumnas[6] = "Saldo"; NombresColumnas[7] = "Estado"; List <object> lista = new List <object>(objDatosCuentaBancaria.consultaCuentaBancariaGeneralINNER());; if (lista.Count > 0) { frm_Busqueda FormularioBusqueda = new frm_Busqueda(); FormularioBusqueda.CargarBanco(lista); FormularioBusqueda.EstablecerPropiedades("Busqueda de Unidad de Tiempo", NombresColumnas); FormularioBusqueda.OcultarColumna(0); FormularioBusqueda.ShowDialog(); if (FormularioBusqueda.Seleccion) { DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada; objCuentaBancaria.idCuentaBancaria = Convert.ToInt32(Fila.Cells[1].Value); objDatosCuentaBancaria.ConsultaCuentaBancariaEspecifica(objCuentaBancaria); objBanco.idBanco = objCuentaBancaria.idBanco; objDatosBanco.consultaBancoEspecifica(objBanco); objPersona.IdPersona = objCuentaBancaria.idTitular; objDatosPersona.ConsultaPersonaEspecifica(objPersona); this.Set(); } } else { MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK); } this.Inactivar(); }
public clsMensaje setSitio(tbl_ConfigSitio mdlSitio, tbl_RegistroSitio mdlRegistro) { clsMensaje response = new clsMensaje(); try { NapoleonDataAccess controller = new NapoleonDataAccess(); string mensaje = ""; response.valido = controller.setSitio(mdlSitio, mdlRegistro, ref mensaje); } catch (Exception egV) { throw egV; } return(response); }
public clsMensaje updatePassword(int intUsuarioID, string vchPassword, bool SolRe) { clsMensaje response = new clsMensaje(); try { NapoleonDataAccess controller = new NapoleonDataAccess(); string mensaje = ""; response.valido = controller.updatePassword(intUsuarioID, vchPassword, SolRe, ref mensaje); response.vchMensaje = mensaje; } catch (Exception euS) { throw euS; } return(response); }
public clsMensaje updateEstatusProyectos(int intProyectoID, bool activo) { clsMensaje response = new clsMensaje(); try { NapoleonDataAccess controller = new NapoleonDataAccess(); string mensaje = ""; response.valido = controller.updateEstatusProyectos(intProyectoID, activo, ref mensaje); response.vchMensaje = mensaje; } catch (Exception euS) { throw euS; } return(response); }
public SalaEsperaVM() { // Aquí obtendría la partida enviada desde la otra ventana puedesFuncionar2 = true; partida = new clsPartida(); this.salir = new DelegateCommand(salir_execute); SignalR(); this.enviarMensaje = new DelegateCommand(enviarMensaje_execute, enviarMensaje_canExecute); this.comenzarPartida = new DelegateCommand(comenzarPartida_execute, comenzarPartida_canExecute); this.mensaje = new clsMensaje(); mensaje.JugadorQueLoEnvia = new clsJugador(); //partida.ListadoJugadores.Add(new clsJugador("id", 0, "Ivan", false, false, false)); //partida.ListadoJugadores.Add(new clsJugador("id", 0, "Pepe", false, false, false)); }
public clsMensaje setPrioridadesSucMod(PrioridadSucModRequest Request) { clsMensaje _userResponse = new clsMensaje(); try { if (Security.ValidateToken(Request.Token, Request.intUsuarioID, Request.vchUsuario, Request.vchPassword)) { NapoleonDataAccess controller = new NapoleonDataAccess(); _userResponse.vchMensaje = controller.setPrioridadesSucMod(Request.mosID, Request.activar); } } catch (Exception egV) { _userResponse.vchError = egV.Message; } return(_userResponse); }
public clsMensaje updateEstatusPrioridadModalidad(PrioridadModalidadRequest Request) { clsMensaje _userResponse = new clsMensaje(); try { if (Security.ValidateToken(Request.Token, Request.intUsuarioID, Request.vchUsuario, Request.vchPassword)) { NapoleonDataAccess controller = new NapoleonDataAccess(); _userResponse = controller.updateEstatusPrioridadModalidad(Request.mdlPrioridad); } } catch (Exception egV) { throw egV; } return(_userResponse); }
private void btnBuscarTarjeta_Click(object sender, EventArgs e) { AccionBotonAplastado = "B"; clsMensaje objMensaje = new clsMensaje(); clsDatosTarjetaCredito objDatosTarjetaCredito = new clsDatosTarjetaCredito(); clsDatosBanco objDatosBanco = new clsDatosBanco(); String[] NombresColumnas = new String[5]; NombresColumnas[0] = "ID Empresa"; NombresColumnas[1] = "ID Tarjeta"; NombresColumnas[2] = "Descripcion"; NombresColumnas[3] = "Banco"; NombresColumnas[4] = "Estado"; List <object> lista = new List <object>(objDatosTarjetaCredito.consultaTarjetaCreditoGeneralINNER());; if (lista.Count > 0) { frm_Busqueda FormularioBusqueda = new frm_Busqueda(); FormularioBusqueda.CargarBanco(lista); FormularioBusqueda.EstablecerPropiedades("Busqueda de Tarjeta de Credito", NombresColumnas); FormularioBusqueda.OcultarColumna(0); FormularioBusqueda.ShowDialog(); if (FormularioBusqueda.Seleccion) { DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada; objTarjetaCredito.idTarjeta = Convert.ToInt32(Fila.Cells[1].Value); objDatosTarjetaCredito.ConsultaTarjetaCreditoEspecifica(objTarjetaCredito); objBanco.idBanco = objTarjetaCredito.idBanco; objDatosBanco.consultaBancoEspecifica(objBanco); this.Set(); } } else { MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK); } this.Inactivar(); }
public clsMensaje getListEstudios(int intEstatusID, int id_Sitio, int intModalidadID, int intProyectoID) { clsMensaje response = new clsMensaje(); List <clsEstudio> lst = new List <clsEstudio>(); try { NapoleonDataAccess controller = new NapoleonDataAccess(); string mensaje = ""; lst = controller.getListEstudios(intEstatusID, id_Sitio, intModalidadID, intProyectoID, ref mensaje); response.vchMensaje = mensaje; response._lstEst = lst; } catch (Exception egV) { throw egV; } return(response); }
private void btnBuscar_Click(object sender, EventArgs e) { AccionBotonAplastado = "B"; clsMensaje objMensaje = new clsMensaje(); clsDatosMonetarioDetalle objDatosMonetarioDetalle = new clsDatosMonetarioDetalle(); String[] NombresColumnas = new String[5]; NombresColumnas[0] = "ID Empresa"; NombresColumnas[1] = "Codigo"; NombresColumnas[2] = "Descripcion"; NombresColumnas[3] = "Valor"; NombresColumnas[4] = "Estado"; List <object> lista = new List <object>(objDatosMonetarioDetalle.consultaMonetarioDetalleGeneral());; if (lista.Count > 0) { frm_Busqueda FormularioBusqueda = new frm_Busqueda(); FormularioBusqueda.CargarBanco(lista); FormularioBusqueda.EstablecerPropiedades("Busqueda de Unidad de Tiempo", NombresColumnas); FormularioBusqueda.OcultarColumna(0); FormularioBusqueda.ShowDialog(); if (FormularioBusqueda.Seleccion) { DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada; objMonetarioDetalle.idEmpresa = Convert.ToInt32(Fila.Cells[0].Value); objMonetarioDetalle.idDetalleMonetario = Convert.ToInt32(Fila.Cells[1].Value); objMonetarioDetalle.Descripcion = Convert.ToString(Fila.Cells[2].Value); objMonetarioDetalle.Valor = Convert.ToDecimal(Fila.Cells[3].Value); objMonetarioDetalle.Estado = Convert.ToString(Fila.Cells[4].Value); this.Set(); } } else { MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK); } this.Inactivar(); }
public clsMensaje setFileVersion(FileFeed2Request request) { clsMensaje response = new clsMensaje(); try { if (Security.ValidateToken(request.Token, request.intUsuarioID, request.vchUsuario, request.vchPassword)) { NapoleonDataAccess controller = new NapoleonDataAccess(); string mensaje = ""; response.valido = controller.setFileVersion(request.file, ref mensaje); response.vchMensaje = mensaje; } } catch (Exception euS) { throw euS; } return(response); }
public clsMensaje updateUsuario(UserRequest request) { clsMensaje response = new clsMensaje(); try { string mensaje = ""; NapoleonDataAccess controller = new NapoleonDataAccess(); if (Security.ValidateToken(request.Token, request.intUsuarioID, request.vchUsuario, request.vchPassword)) { response.valido = controller.updateUsuario(request.usuario, ref mensaje); response.vchMensaje = mensaje; } } catch (Exception euS) { throw euS; } return(response); }
protected void grvFiles_RowCommand(object sender, GridViewCommandEventArgs e) { try { int intVersionID = 0; tbl_CAT_Feed2Version mdl = new tbl_CAT_Feed2Version(); switch (e.CommandName) { case "Descargar": string urlabrir = ""; intVersionID = Convert.ToInt32(e.CommandArgument.ToString()); mdl = lstCATFeed2.First(x => x.intVersionID == intVersionID); Session["File"] = mdl; urlabrir = URL + "/frmDownLoad.aspx?ID=" + Security.Encrypt(mdl.intVersionID.ToString()); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Cerrar", "javascript:Redirecciona('" + urlabrir + "');", true); break; case "Estatus": intVersionID = Convert.ToInt32(e.CommandArgument.ToString()); mdl = lstCATFeed2.First(x => x.intVersionID == intVersionID); mdl.bitActivo = !mdl.bitActivo; clsMensaje response = new clsMensaje(); response = NapoleonDA.updateEstatusFiles(intVersionID, (bool)mdl.bitActivo); if (response.valido) { cargarArchivos(); ShowMessage("Cambios correctos", MessageType.Correcto, "alert_containerSites"); } else { ShowMessage("Existe un error al actualizar el estatus: " + response.vchMensaje, MessageType.Error, "alert_containerSites"); } break; } } catch (Exception eCommand) { Log.EscribeLog("Existe un error en grvFiles_RowCommand: " + eCommand.Message); } }
private void btnGrabar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { clsDatosUnidadTiempo objDatosUnidadTiempo = new clsDatosUnidadTiempo(); clsMensaje objMensaje = new clsMensaje(); if (this.Get()) { if (AccionBotonAplastado == "N") { this.Get(); if (objDatosUnidadTiempo.guardar(objUnidadTiempo)) { string variable = objMensaje.Titulo; MessageBox.Show(objMensaje.Guardar_ok, objMensaje.Titulo, MessageBoxButtons.OK); } else { MessageBox.Show(objMensaje.Guardar_error, objMensaje.Titulo, MessageBoxButtons.OK); } } else if (AccionBotonAplastado == "M") { this.Get(); if (objDatosUnidadTiempo.modificar(objUnidadTiempo)) { string variable = objMensaje.Titulo; MessageBox.Show(objMensaje.Modificar_ok, objMensaje.Titulo, MessageBoxButtons.OK); } else { MessageBox.Show(objMensaje.Modificar_error, objMensaje.Titulo, MessageBoxButtons.OK); } } } this.Limpiar(); this.Inactivar(); AccionBotonAplastado = "G"; }
protected void chkRow_CheckedChanged(object sender, EventArgs e) { try { GridViewRow row = ((GridViewRow)((CheckBox)sender).NamingContainer); int index = row.RowIndex; CheckBox chk = (CheckBox)sender; int mosID = Convert.ToInt32(grvPrioridad.DataKeys[index].Value.ToString()); clsMensaje _men = new clsMensaje(); PrioridadSucModRequest _req = new PrioridadSucModRequest(); _req.mosID = mosID; _req.activar = chk.Checked; _req.Token = Session["Token"].ToString(); _req.intUsuarioID = Session["intUsuarioID"].ToString(); _req.vchUsuario = Session["UserID"].ToString(); _req.vchPassword = Session["Password"].ToString(); _men = NapoleonDA.setPrioridadesSucMod(_req); if (_men != null) { if (_men.vchMensaje == "OK") { ShowMessage("Se guardo correctamente la información.", MessageType.Correcto, "alert_containerPrioridad"); cargaGridPrioridad(); } else { ShowMessage("Existe un error al realziar el proceso: " + (_men.vchMensaje == "" ? _men.vchError : _men.vchMensaje), MessageType.Error, "alert_containerPrioridad"); } } else { ShowMessage("No se pudo guardar el proceso. Favor de verificar la información.", MessageType.Informacion, "alert_containerPrioridad"); } } catch (Exception eck) { ShowMessage("Existe un error: " + eck.Message, MessageType.Error, "alert_containerPrioridad"); } }
public Boolean Get() { clsMensaje objMensaje = new clsMensaje(); try { objInversion.idEmpresa = idEmpresa; objInversion.idUsuario = idUsuario; objInversion.idInversion = Convert.ToInt32(this.txtNumeroInversion.Text); objInversion.idEntidad = objPersona.IdPersona; objInversion.idTipoInversion = Convert.ToInt32(gueTipoInversion.EditValue); objInversion.Tiempo = Convert.ToInt32(this.txtTiempo.Text); objInversion.idUnidadTiempo = Convert.ToInt32(gueUnidadTiempo.EditValue); objInversion.idBanco = Convert.ToInt32(gueBanco.EditValue); objInversion.Valor = Convert.ToDecimal(txtValor.Text); objInversion.Porcentaje = Convert.ToDecimal(txtPorcentaje.Text); objInversion.Ganancia = this.Ganancia(); objInversion.Fecha = Convert.ToDateTime(deFechaActual.EditValue); objInversion.FechaModificacion = Convert.ToDateTime(deFechaActual.EditValue); objInversion.FechaInicio = Convert.ToDateTime(deFechaDesde.EditValue); objInversion.FechaFinal = Convert.ToDateTime(deFechaHasta.EditValue); if (ckbActivo.Checked) { objInversion.idEstado = "A"; } else { objInversion.idEstado = "I"; } return(true); } catch (Exception) { MessageBox.Show(objMensaje.Valor_invalido, objMensaje.Titulo, MessageBoxButtons.OK); return(false); throw; } }
private void btnAperturar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { clsDatosAperturaCaja objDatosAperturaCaja = new clsDatosAperturaCaja(); clsMensaje objMensaje = new clsMensaje(); string msgMonto = "Confirma que este es el monto de apertura correcto: " + txtMonto.Text; DialogResult ResultadoDialogo = MessageBox.Show(msgMonto, objMensaje.Titulo, MessageBoxButtons.YesNo); if (ResultadoDialogo == DialogResult.Yes) { if (this.Get()) { if (objDatosAperturaCaja.guardar(objAperturaCaja)) { for (int i = 0; i < dgvApertura.Rows.Count; i++) { if (Convert.ToString(dgvApertura.Rows[i].Cells[4].Value) == "A") { clsDatosAperturaDet objDatosAperturaDet = new clsDatosAperturaDet(); clsAperturaDet objAperturaDet = new clsAperturaDet(); objAperturaDet.idEmpresa = idEmpresa; objAperturaDet.idUsuario = idUsuario; objAperturaDet.idAperturaCaja = objAperturaCaja.idAperturaCaja; objAperturaDet.Denominacion = Convert.ToInt32(dgvApertura.Rows[i].Cells[1].Value); objAperturaDet.Cantidad = Convert.ToInt32(dgvApertura.Rows[i].Cells[5].Value); objAperturaDet.idEstado = idEstado; objDatosAperturaDet.guardar(objAperturaDet); } } MessageBox.Show(objMensaje.Guardar_ok, objMensaje.Titulo, MessageBoxButtons.OK); } else { MessageBox.Show(objMensaje.Guardar_error, objMensaje.Titulo, MessageBoxButtons.OK); } } } AccionBotonAplastado = "G"; }
private void btnEliminar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { clsDatosTipoInversion objDatosTipoInversion = new clsDatosTipoInversion(); clsMensaje objMensaje = new clsMensaje(); this.Get(); if (AccionBotonAplastado == "B") { if (objDatosTipoInversion.eliminar(objTipoInversion)) { string variable = objMensaje.Titulo; MessageBox.Show(objMensaje.Eliminar_ok, objMensaje.Titulo, MessageBoxButtons.OK); } else { MessageBox.Show(objMensaje.Eliminar_error, objMensaje.Titulo, MessageBoxButtons.OK); } } this.Limpiar(); this.Inactivar(); AccionBotonAplastado = "E"; }
public Boolean Get() { clsMensaje objMensaje = new clsMensaje(); try { objAperturaCaja.idEmpresa = idEmpresa; objAperturaCaja.idUsuario = idUsuario; objAperturaCaja.idAperturaCaja = Convert.ToInt32(this.txtCodigo.Text); objAperturaCaja.Fecha = dtpFecha.Value; objAperturaCaja.FechaModificacion = dtpFecha.Value; objAperturaCaja.Monto = Convert.ToDecimal(this.txtMonto.Text); objAperturaCaja.idEstado = idEstado; return(true); } catch (Exception) { MessageBox.Show(objMensaje.Valor_invalido, objMensaje.Titulo, MessageBoxButtons.OK); return(false); throw; } }
private void btnBuscarBanco_Click(object sender, EventArgs e) { clsMensaje objMensaje = new clsMensaje(); clsDatosBanco objDatosBanco = new clsDatosBanco(); String[] NombresColumnas = new String[4]; NombresColumnas[0] = "ID Empresa"; NombresColumnas[1] = "Codigo"; NombresColumnas[2] = "Banco"; NombresColumnas[3] = "Estado"; List <object> lista = new List <object>(objDatosBanco.consultaBancoGeneral());; if (lista.Count > 0) { frm_Busqueda FormularioBusqueda = new frm_Busqueda(); FormularioBusqueda.CargarBanco(lista); FormularioBusqueda.EstablecerPropiedades("Busqueda de Bancos", NombresColumnas); FormularioBusqueda.OcultarColumna(0); FormularioBusqueda.ShowDialog(); if (FormularioBusqueda.Seleccion) { DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada; objBanco.idEmpresa = Convert.ToInt32(Fila.Cells[0].Value); objBanco.idBanco = Convert.ToInt32(Fila.Cells[1].Value); objBanco.Nombre = Convert.ToString(Fila.Cells[2].Value); objBanco.Estado = Convert.ToString(Fila.Cells[3].Value); this.txtBanco.Text = objBanco.Nombre; } } else { MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK); } }
private void btnBuscarInversion_Click(object sender, EventArgs e) { AccionBotonAplastado = "B"; clsMensaje objMensaje = new clsMensaje(); clsDatosTipoInversion objDatosTipoInversion = new clsDatosTipoInversion(); clsDatosUnidadTiempo objUnidadTiempo = new clsDatosUnidadTiempo(); clsDatosBanco objDatosBanco = new clsDatosBanco(); clsDatosPersonaCXC objDatosPersona = new clsDatosPersonaCXC(); clsDatosInversion objDatosInversion = new clsDatosInversion(); String[] NombresColumnas = new String[16]; NombresColumnas[0] = "ID Empresa"; NombresColumnas[1] = "ID Usuario"; NombresColumnas[2] = "ID Inversion"; NombresColumnas[3] = "ID Entidad"; NombresColumnas[4] = "ID Tipo Inversion"; NombresColumnas[5] = "Tiempo"; NombresColumnas[6] = "ID Unidad Tiempo"; NombresColumnas[7] = "ID Banco"; NombresColumnas[8] = "Valor"; NombresColumnas[9] = "Porcentaje"; NombresColumnas[10] = "Ganancia"; NombresColumnas[11] = "Fecha Inversion"; NombresColumnas[12] = "Fecha Modificacion"; NombresColumnas[13] = "Fecha Inicio"; NombresColumnas[14] = "Fecha Fin"; NombresColumnas[15] = "Estado"; List <object> lista = new List <object>(objDatosInversion.consultaInversionGeneral());; if (lista.Count > 0) { frm_Busqueda FormularioBusqueda = new frm_Busqueda(); FormularioBusqueda.CargarBanco(lista); FormularioBusqueda.EstablecerPropiedades("Total Inversiones", NombresColumnas); FormularioBusqueda.OcultarColumna(12); FormularioBusqueda.ShowDialog(); if (FormularioBusqueda.Seleccion) { DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada; objInversion.idInversion = Convert.ToInt32(Fila.Cells[2].Value); objDatosInversion.ConsultaInversionEspecifica(objInversion); MessageBox.Show(Convert.ToString(objInversion.idTipoInversion)); objTipoInversion.idTipoInversion = objInversion.idTipoInversion; MessageBox.Show(Convert.ToString(objTipoInversion.idTipoInversion)); objDatosTipoInversion.consultaTipoInversionEspecifica(objTipoInversion); MessageBox.Show(Convert.ToString(objTipoInversion.Descripcion)); this.Set(); /* * * objPersona.IdPersona = objCuentaBancaria.idTitular; * objDatosPersona.ConsultaEspecificaPersona(objPersona); * this.Set();*/ } } else { MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK); } this.Inactivar(); }
public frmMantenimientoEmpleado() { InitializeComponent(); clsMensaje msj = new clsMensaje(); }
protected void btnGuardar_Click(object sender, EventArgs e) { try { bool valido = false; if (btnChangePass.Checked) { if (txtPass.Text != Security.Decrypt(user.vchPassword)) { if (txtPass.Text == txtRePass.Text) { valido = true; } else { ShowMessage("La contraseña no coincide, favor de verificar.", MessageType.Advertencia, "alert_container"); valido = false; } } else { valido = false; ShowMessage("Favor de capturar una contraseña diferente a la actual.", MessageType.Advertencia, "alert_container"); } } else { valido = true; } if (valido) { clsUsuario mdl = new clsUsuario(); mdl = obtenerUsuario(); if (mdl != null) { UserRequest request = new UserRequest(); clsMensaje response = new clsMensaje(); request.user = mdl; request.intUsuarioID = user.intUsuarioID.ToString(); request.vchPassword = user.vchPassword; request.vchUsuario = user.vchUsuario; request.Token = user.Token; if (request != null) { response = NapoleonDA.setActualizaUser(request); if (response.valido) { ShowMessage("Cambios correctos, favor de iniciar sesión.", MessageType.Correcto, "alert_container"); if (btnChangePass.Checked) { Session.Clear(); Response.Redirect(URL + "/frmLogin.aspx", false); } } else { ShowMessage("Existe un error al guardar: " + response.vchMensaje, MessageType.Error, "alert_container"); } } else { ShowMessage("Favor de verificar la información.", MessageType.Informacion, "alert_container"); } } else { ShowMessage("Favor de verificar la información.", MessageType.Informacion, "alert_container"); } } } catch (Exception eGU) { ShowMessage("Existe un error: " + eGU.Message, MessageType.Error, "alert_container"); Log.EscribeLog("Existe un error al guardar: " + eGU.Message); } }
public frmFrecuenciaPago() { InitializeComponent(); event_click += new delegate_Click(frmFrecuenciaPago_event_click); clsMensaje ms = new clsMensaje(); }
public clsMainPageVM() { SignalR(); mensajeChat = new clsMensaje(); comandoEnviar = new DelegateCommand(Enviar); }