示例#1
0
        public void SaveBlog(Blog blog)
        {
            var query = Insert("blogs_blogs")
                .InColumns("id", "name", "user_id", "group_id")
                .Values(blog.BlogID, blog.Name, blog.UserID.ToString(), blog.GroupID.ToString())
                .Identity(1, 0L, true);

            blog.BlogID = Db.ExecuteScalar<int>(query);
        }
示例#2
0
 private string GetBlogTypeName(Blog blog)
 {
     if (blog.GroupID == new Guid())
     {
         return ASC.Blogs.Core.Resources.BlogsResource.InPersonalBlogLabel;
     }
     else
     {
         var g = CoreContext.GroupManager.GetGroupInfo(blog.GroupID);
         var name = g.ID != ASC.Core.Users.Constants.LostGroupInfo.ID ? g.Name : string.Empty;
         return ASC.Blogs.Core.Resources.BlogsResource.InGroupBlogLabel + " \"" + name + "\"";
     }
 }