johnk
  •  johnk
  • 74.2% (Friendly)
  • YAF All-the-Time Topic Starter
2013-06-01T02:44:09Z
Steps:

1. Download and install latest version from codeplex.
2. Go to Administration > Forums
3. Click on New category.
4. Enter category name and click save
5. System gives an error message


Server Error in '/' Application.

Cannot implicitly convert type 'decimal' to 'int'. An explicit conversion exists (are you missing a cast?)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'decimal' to 'int'. An explicit conversion exists (are you missing a cast?)

Source Error: 


Line 131:            CodeContracts.ArgumentNotNull(repository, "repository");
Line 132:
Line 133:            int newId = repository.DbFunction.Scalar.category_save(
Line 134:                BoardID: boardId ?? repository.BoardID, CategoryID: categoryID ?? 0, Name: name, SortOrder: sortOrder, CategoryImage: categoryImage);
Line 135:

Source File: d:\yafnet_1236b34131cb\yafsrc\YAF.Core\Model\CategoryRepositoryExtensions.cs    Line: 133 

Stack Trace: 


[RuntimeBinderException: Cannot implicitly convert type 'decimal' to 'int'. An explicit conversion exists (are you missing a cast?)]
   CallSite.Target(Closure , CallSite , Object ) +137
   YAF.Core.Model.CategoryRepositoryExtensions.Save(IRepository`1 repository, Nullable`1 categoryID, String name, String categoryImage, Int16 sortOrder, Nullable`1 boardId) in d:\Website\yafnet_1236b34131cb\yafsrc\YAF.Core\Model\CategoryRepositoryExtensions.cs:133
   YAF.Pages.Admin.editcategory.Save_Click(Object sender, EventArgs e) +559
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9552602


When you click back button, I noticed the new categories are still been created. But system throws the error message above when save is clicked.
Sponsor
tha_watcha
2013-06-01T16:33:36Z

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved