Ejemplo n.º 1
0
        public void InsertComment(string Poster, string Commenter, string Headline, string Comment_Content, string Date, string Time)
        {
            Comment c   = new Comment();
            Forum   f   = new Forum();
            Account a   = new Account();
            int     PID = a.AccountGetID(Poster);
            int     CID = a.AccountGetID(Commenter);
            int     FID = f.ForumGetID(Headline, PID);


            c.CommentInsert(Date, Time, Comment_Content, CID, FID);
        }
Ejemplo n.º 2
0
        public void UpdateSpamCounter(string Username, int SpamCounter)
        {
            Account ac  = new Account();
            int     AID = ac.AccountGetID(Username);

            ac.AccountUpdateSpamCounter(AID, SpamCounter);
        }
Ejemplo n.º 3
0
        public int GetSpamCounter(string Username)
        {
            Account a   = new Account();
            int     AID = a.AccountGetID(Username);

            return(a.AccountGetSpamCounter(AID));
        }
Ejemplo n.º 4
0
        public void InsertForum(string Username, string Headline, string Date, string Time, string Forum_Content)
        {
            Account a   = new Account();
            Forum   f   = new Forum();
            int     AID = a.AccountGetID(Username);

            f.ForumInsert(Headline, Forum_Content, Date, Time, AID);
        }
Ejemplo n.º 5
0
        public void GetForumContent(string Username, string Headline, out string ForumContent, out string Date, out string Time)
        {
            Forum   f   = new Forum();
            Account a   = new Account();
            int     AID = a.AccountGetID(Username);
            int     FID = f.ForumGetID(Headline, AID);

            f.ForumGet(FID, out ForumContent, out Date, out Time);
        }
Ejemplo n.º 6
0
        public void InsertPhoto(byte[] Image, string Poster, string Headline)
        {
            Photo   p   = new Photo();
            Forum   f   = new Forum();
            Account a   = new Account();
            int     AID = a.AccountGetID(Poster);
            int     FID = f.ForumGetID(Headline, AID);

            p.InsertPhoto(Image, FID);
        }
Ejemplo n.º 7
0
        public void FeedbackInsert(string Username, string Guide_Name, string Plant_Name, string Date, string Time, string Feedback_Content, int Rating)
        {
            Guide    G   = new Guide();
            Feedback f   = new Feedback();
            Account  a   = new Account();
            int      AID = a.AccountGetID(Username);
            int      GID = G.GuideGetID(Guide_Name, Plant_Name);

            f.FeedbackInsert(Date, Time, Feedback_Content, AID, GID, Rating);
        }
Ejemplo n.º 8
0
        public byte[] GetPhoto(string Poster, string Headline)
        {
            byte[]  Img;
            Photo   p   = new Photo();
            Forum   f   = new Forum();
            Account a   = new Account();
            int     AID = a.AccountGetID(Poster);
            int     FID = f.ForumGetID(Headline, AID);

            p.GetPhoto(out Img, FID);

            return(Img);
        }
Ejemplo n.º 9
0
        public void GetComments(string Headline, string Poster, out List <string> CommentPoster, out List <string> Date, out List <string> Time, out List <string> Content)
        {
            Forum   f   = new Forum();
            Comment c   = new Comment();
            Account a   = new Account();
            int     PID = a.AccountGetID(Poster);
            int     FID = f.ForumGetID(Headline, PID);

            c.CommentGetForForum(FID, out CommentPoster, out Date, out Time, out Content);
            int x = 0;

            x++;
        }
Ejemplo n.º 10
0
        public void GetUsertInfo(string Username, out string Last_Name, out string Given_Name, out string Middle_Name, out string Suffix, out string Email_Address)
        {
            int    AID, PID, SPC;
            string Uname, Pword, Role;


            Account ac = new Account();
            Person  p  = new Person();


            AID = ac.AccountGetID(Username);
            ac.AccountGetInfo(AID, out Uname, out Pword, out Role, out PID, out SPC);
            p.PersonGet(PID, out Last_Name, out Given_Name, out Middle_Name, out Suffix, out Email_Address);
        }
Ejemplo n.º 11
0
        public bool AccountAuthenticate(string Username, string Password)
        {
            Account ac = new Account();
            string  Uname, Pword, Role;
            int     PID, SPC;
            int     AID = ac.AccountGetID(Username);

            ac.AccountGetInfo(AID, out Uname, out Pword, out Role, out PID, out SPC);
            if (Pword == Password)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 12
0
        public string UpdateAccount(string Username, string NewUsername, string NewPassword)
        {
            Account ac  = new Account();
            int     AID = ac.AccountGetID(Username);

            try
            {
                ac.AccountUpdate(NewUsername, NewPassword, "User", AID);
            }
            catch
            {
                return("Error in changing account details!, Username might have already been taken!");
            }



            return("Account information updated!");
        }