예제 #1
0
        public List <Cs_Post> FetchPost(int count)
        {
            if (!Cs_CommonFunction.IsUserLoggedIn())
            {
                return(new List <Cs_Post>());
            }
            int            userID   = Convert.ToInt32(Session["UserID"]);
            Cs_Post        cs_Post  = new Cs_Post();
            List <Cs_Post> listPost = cs_Post.FetchPost(userID, count);

            return(listPost);
        }
예제 #2
0
        public static string PostToWall(string message, string imagename, int privacy)
        {
            Cs_Post cs_Post = new Cs_Post()
            {
                UserID      = (int)HttpContext.Current.Session["UserID"],
                DateTime    = DateTime.Now,
                ExpiredDate = DateTime.Now.AddDays(5),
                Privacy     = privacy,
                Message     = message,
                PostType    = 0,
            };

            if (imagename != "")
            {
                cs_Post.Image = "img" + HttpContext.Current.Session["UserID"] + imagename;
            }
            else
            {
                cs_Post.Image = "";
            }
            DataTable dt = cs_Post.PostMessage();

            return("Success");
        }