Exemple #1
0
 public static Usuario Criar(
     long id,
     string nome,
     string senha,
     string ConfirmaSenha,
     string email,
     string login,
     string emailParaContato,
     string telefone,
     eTipoUsuario tipoUsuario,
     ArquivoUsuario ImagemPerfil
     )
 {
     return(new Usuario(id)
     {
         Login = login,
         Nome = nome,
         Senha = senha,
         ConfirmarSenha = ConfirmaSenha,
         Email = email,
         EmailParaContato = emailParaContato,
         ImagemPerfil = ImagemPerfil,
         Telefone = telefone,
         TipoUsuario = tipoUsuario
     });
 }
Exemple #2
0
 public void ChangeType(eTipoUsuario tipo)
 {
     if (tipo == eTipoUsuario.ServerChat)
         {
             ImageIndex = 0;
             ToolTipText = "ServerChat";
         }else if (tipo == eTipoUsuario.Normal)
         {
             ImageIndex = 1;
             ToolTipText = "Usuario";
         } else if (tipo == eTipoUsuario.Banned)
         {
             ImageIndex = 2;
             ToolTipText = "Banned";
         }
 }
Exemple #3
0
 public static Usuario CriarNovo(
     string nome,
     string senha,
     string email,
     string login,
     eTipoUsuario tipoUsuario
     )
 {
     return(new Usuario(0)
     {
         Login = login,
         Nome = nome,
         Senha = senha,
         Email = email,
         TipoUsuario = tipoUsuario
     });
 }
Exemple #4
0
 public static Usuario CriarNovo(
     string nome,
     string login,
     string senha,
     eTipoUsuario tipoUsuario,
     bool ativo
     )
 {
     return(new Usuario(0)
     {
         Nome = nome,
         Login = login,
         Senha = senha,
         TipoUsuario = tipoUsuario,
         Ativo = ativo
     });
 }
Exemple #5
0
 public void ChangeType(eTipoUsuario tipo)
 {
     if (tipo == eTipoUsuario.ServerChat)
     {
         ImageIndex  = 0;
         ToolTipText = "ServerChat";
     }
     else if (tipo == eTipoUsuario.Normal)
     {
         ImageIndex  = 1;
         ToolTipText = "Usuario";
     }
     else if (tipo == eTipoUsuario.Banned)
     {
         ImageIndex  = 2;
         ToolTipText = "Banned";
     }
 }
Exemple #6
0
 public cChannelUser(string username, string ip, eTipoUsuario tipo)
 {
     _username = username;
     _ip = ip;
     _tipo = tipo;
 }
Exemple #7
0
 public cChannelUser(string username, string ip, eTipoUsuario tipo)
 {
     _username = username;
     _ip       = ip;
     _tipo     = tipo;
 }
Exemple #8
0
        public DataTable getPermisos(string sistema,eTipoUsuario tipoUser)
        {
            MySqlDataReader reader;
            DataTable datos = new DataTable();
            try
            {
                string sql = "ddicark.SP_GET_PERMISOS";
                MySqlCommand cmd = new MySqlCommand(sql, conn.conection);
                cmd.CommandType = CommandType.StoredProcedure;

                MySqlParameter sys = cmd.Parameters.Add("sys", MySqlDbType.VarChar, 20);
                sys.Direction = ParameterDirection.Input;
                MySqlParameter tipo = cmd.Parameters.Add("tipo", MySqlDbType.Int32);
                tipo.Direction = ParameterDirection.Input;

                sys.Value = sistema;
                tipo.Value = (int)tipoUser;

                reader = cmd.ExecuteReader();
                if (reader.HasRows)
                {
                    datos.Load(reader);
                }
                reader.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "ERROR AL OBTENER PERMISOS ", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return datos;
        }