public BoolWithPrimaryKeyView Comment(ToCommentView commentView) { CommentInfo comment = new CommentInfo() { ID = Guid.NewGuid().ToString(), Content = commentView.Content, PublishID = commentView.PublishID, CommentTime = DateTime.Now, FromCommenterID = this.UserID, FromCommenterName = this.UserName, ToCommenterID = commentView.ToCommenterID, ToCommenterName = commentView.ToCommenterName }; bool temp = IcommentInfo.Insert(comment); BoolWithPrimaryKeyView result = new BoolWithPrimaryKeyView() { PrimaryID = temp == true ? comment.ID : string.Empty, result = temp }; return(result); }
public BoolWithPrimaryKeyView SubmitMessage(ToCommentView commentView) { Miic.Friends.Community.MessageInfo messageInfo = new Miic.Friends.Community.MessageInfo() { ID = Guid.NewGuid().ToString(), Content = commentView.Content, TopicID = commentView.PublishID, CommentTime = DateTime.Now, FromCommenterID = this.UserID, FromCommenterName = this.UserName, ToCommenterID = commentView.ToCommenterID, ToCommenterName = commentView.ToCommenterName }; bool temp = ImessageInfo.Insert(messageInfo); BoolWithPrimaryKeyView result = new BoolWithPrimaryKeyView() { PrimaryID = temp == true ? messageInfo.ID : string.Empty, result = temp }; return(result); }