- Fixing 16258: Save Comment throws SQLDateTime overflow or The view 'Create' was not found

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-03-04 12:19:03 -08:00
parent c0b640c498
commit 99ec679363
5 changed files with 5 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ namespace Orchard.Comments.Models {
public virtual string UserName { get; set; } public virtual string UserName { get; set; }
public virtual string Email { get; set; } public virtual string Email { get; set; }
public virtual CommentStatus Status { get; set; } public virtual CommentStatus Status { get; set; }
public virtual DateTime CommentDateUtc { get; set; } public virtual DateTime? CommentDateUtc { get; set; }
public virtual string CommentText { get; set; } public virtual string CommentText { get; set; }
public virtual int CommentedOn { get; set; } public virtual int CommentedOn { get; set; }
public virtual int CommentedOnContainer { get; set; } public virtual int CommentedOnContainer { get; set; }

View File

@@ -83,7 +83,7 @@
<%=Html.Encode(commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText) %><%=_Encoded(" ...") %> <%=Html.Encode(commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText) %><%=_Encoded(" ...") %>
<% } %> <% } %>
</td> </td>
<td><%=commentEntry.Comment.CommentDateUtc.ToLocalTime() %></td> <td><%=commentEntry.Comment.CommentDateUtc.GetValueOrDefault().ToLocalTime()) %></td>
<td> <td>
<ul class="actions"> <ul class="actions">
<li class="construct"> <li class="construct">

View File

@@ -67,7 +67,7 @@
<%=Html.Encode(commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText) %><%=_Encoded(" ...") %> <%=Html.Encode(commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText) %><%=_Encoded(" ...") %>
<% } %> <% } %>
</td> </td>
<td><%=commentEntry.Comment.CommentDateUtc.ToLocalTime() %></td> <td><%=commentEntry.Comment.CommentDateUtc.GetValueOrDefault().ToLocalTime()) %></td>
<td><%=Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn }) %></td> <td><%=Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn }) %></td>
<td> <td>
<ul class="actions"> <ul class="actions">

View File

@@ -6,7 +6,7 @@ foreach (var comment in Model) { %>
<div class="comment"> <div class="comment">
<span class="who"><%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span> <span class="who"><%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span>
<%-- todo: (heskew) need comment permalink --%> <%-- todo: (heskew) need comment permalink --%>
<span>said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc), "#")%></span> <span>said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault()), "#")%></span>
</div> </div>
<div class="text"> <div class="text">
<%-- todo: (heskew) comment text needs processing depending on comment markup style --%> <%-- todo: (heskew) comment text needs processing depending on comment markup style --%>

View File

@@ -9,7 +9,7 @@ foreach (var comment in Model) { %>
</div> </div>
<div class="commentauthor"> <div class="commentauthor">
<span class="who"><%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span>&nbsp;<span>said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc), "#")%></span> <span class="who"><%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span>&nbsp;<span>said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault()), "#")%></span>
</div> </div>
</li><% </li><%