Пример #1
0
    protected String GetPosterName(int poster_id, int is_admin)
    {
        String name = "";

        if (is_admin == 0)
        {
            name = blog.UserNameFetch(poster_id);
        }
        else if (is_admin == 1)
        {
            name = blog.AdminNameFetch(poster_id) + " (Admin)";
        }

        return(name);
    }
Пример #2
0
    protected String commenter_name(int id, int is_admin)
    {
        try
        {
            String name = "";
            if (is_admin == 0)
            {
                name = blogviewer.UserNameFetch(id);
            }
            else if (is_admin == 1)
            {
                name = blogviewer.AdminNameFetch(id);
            }

            return(name);
        }
        catch (Exception ex)
        {
            ErrorReportBAL error = new ErrorReportBAL();
            error.SendErrorReport("ViewPost.aspx", ex.ToString());
            Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>");
            return(null);
        }
    }