Example #1
0
        public int DBSetActualizaUsuarioPlataforma(UsuariosPlataforma oUser, int iIdUsuarioPlat)
        {
            try
            {
                object oRes = oDB_SP.EjecutarValor("[dbo].[spU_FL_ActualizaInformacionUsuarioPlataforma]", "@IdUsuario", iIdUsuarioPlat,
                                                   "@Correo", oUser.sCorreo,
                                                   "@Password", oUser.sPassword,
                                                   "@NombreCompleto", oUser.sNombre,
                                                   "@Telefono", oUser.sTelefono,
                                                   "@UsuarioModificacion", Utils.GetNombreUsuario);

                return(oRes.S().I());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public int DBSetInsertaUsuariosEnLaPlataforma(UsuariosPlataforma oUser)
        {
            try
            {
                object oRes = oDB_SP.EjecutarValor("[dbo].[spI_FL_InsertaUsuariosEnLaPlataforma]", "@IdEmpresa", oUser.iEmpresa,
                                                   "@Correo", oUser.sCorreo,
                                                   "@Password", oUser.sPassword,
                                                   "@NombreCompleto", oUser.sNombre,
                                                   "@Telefono", oUser.sTelefono,
                                                   "@UsuarioCreacion", Utils.GetNombreUsuario);

                return(oRes.S().I());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void gvUsariosPlataforma_RowCommand(object sender, ASPxGridViewRowCommandEventArgs e)
        {
            try
            {
                string sOpcion = ((DevExpress.Web.ASPxButton)e.CommandSource).CommandName.S();
                iIdUsuarioPlat = e.CommandArgs.CommandArgument.S().I();

                if (sOpcion == "Actualizar")
                {
                    object cellValues = gvUsuariosPlataforma.GetRowValuesByKeyValue(iIdUsuarioPlat, new string[] { "Correo"           //0
                                                                                                                   , "NombreCompleto" //1
                                                                                                                   , "Telefono"       //2
                                                                                                                   , "Password"       //3
                                                                                    });

                    UsuariosPlataforma oU = new UsuariosPlataforma();
                    oU.sCorreo   = ((object[])cellValues)[0].S();
                    oU.sNombre   = ((object[])cellValues)[1].S();
                    oU.sTelefono = ((object[])cellValues)[2].S();
                    oU.sPassword = ((object[])cellValues)[3].S();

                    oUser = oU;

                    ppAltaUsuario.ShowOnPageLoad = true;
                }
                else if (sOpcion == "Eliminar")
                {
                    if (eDeleteObj != null)
                    {
                        eDeleteObj(sender, e);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }