コード例 #1
0
        public static bool deleteUser(string id)
        {
            string    action     = "DE";
            CTL_USERS oCTL_USERS = new CTL_USERS();

            oCTL_USERS.Id = Convert.ToInt32(id);
            return(UsersLN.crudUser(oCTL_USERS, action));
        }
コード例 #2
0
        public static bool updateUser(string id, string nombre, string apellidoP, string apellidoM, string correo, string nombreUsuario, string idRol, string idStatus)
        {
            string    action     = "UP";
            CTL_USERS oCTL_USERS = new CTL_USERS();

            oCTL_USERS.Id         = Convert.ToInt32(id);
            oCTL_USERS.Name       = nombre;
            oCTL_USERS.LastName   = apellidoP;
            oCTL_USERS.Surname    = apellidoM;
            oCTL_USERS.Email      = correo;
            oCTL_USERS.UserName   = nombreUsuario;
            oCTL_USERS.IdRole     = Convert.ToInt32(idRol);
            oCTL_USERS.statusUser = Convert.ToInt32(idStatus);
            return(UsersLN.crudUser(oCTL_USERS, action));
        }
コード例 #3
0
        public static bool addteUser(string nombre, string apellidoP, string apellidoM, string correo, string nombreUsuario, string idRol, string password)
        {
            string    action     = "IN";
            CTL_USERS oCTL_USERS = new CTL_USERS();

            oCTL_USERS.Name     = nombre;
            oCTL_USERS.LastName = apellidoP;
            oCTL_USERS.Surname  = apellidoM;
            oCTL_USERS.Email    = correo;
            oCTL_USERS.UserName = nombreUsuario;
            oCTL_USERS.IdRole   = Convert.ToInt32(idRol);
            oCTL_USERS.Password = password;
            oCTL_USERS.Parent   = 1;
            oCTL_USERS.WebPage  = "gestionarUsuarios.apsx";
            return(UsersLN.crudUser(oCTL_USERS, action));
        }
コード例 #4
0
 /// <summary>
 /// Agrega, actualiza, y elimina un usuario
 /// - Action = IN para agregar
 /// - Action = UP para actualizar
 /// - Action = DE para eliminar
 /// </summary>
 /// <param name="oCTL_USERS">oCTL_USERS Objeto a agregar, actualizar o eliminar</param>
 /// <param name="action">action Acción a realizar</param>
 /// <returns></returns>
 public static bool crudUser(CTL_USERS oCTL_USERS, string action)
 {
     return(CTL_USERS_DAO.crudteUser(oCTL_USERS, action));
 }