Beispiel #1
0
        public void addPost(Post post)
        {
            try
            {
                post.post_date = DateTime.Now;

                if (post.post_doc_id != null)
                {
                    if (post.list_document_id.Count() > 1)
                    {
                        post.post_doc_id = string.Join(",", post.list_document_id);
                    }
                }
                else if (post.list_gpslocation_id != null)
                {
                    if (post.list_gpslocation_id.Count() > 1)
                    {
                        post.post_gpslocation_id = string.Join(",", post.list_gpslocation_id);
                    }
                }
                else if (post.list_gpslocation_id != null)
                {
                    if (post.list_tag_user_id.Count() > 1)
                    {
                        post.post_tag_user_id = string.Join(",", post.list_tag_user_id);
                    }
                }
                else if (post.post_event_id != null)
                {
                    if (post.list_event_id != null)
                    {
                        post.post_event_id = string.Join(",", post.list_event_id);
                    }
                }
                objUserInfoDAL.addPost(post);
            }
            catch (Exception ex)
            {
                CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while storing Post details" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString());
            }
        }