Creating a simple award - not able to save my choise
I've followed this guide, Add an award, and this, Save custom data in the database. I've created a table uCommerce_PointsAward, added tags to Custom.config and added a row to uCommerce_EntityUi which points at my usercontrol.
The award shows up in backend and I'm able to added it, but when I click save it disappears - see this video: http://screencast.com/t/U4wswe7I1VK
I'm not getting any errors - not even in the browser console.
Here is my code:
namespace PointsAward
{
public class PointsAward : Award
{
public virtual int PointsAwardId { get; protected set; }
public override void Apply(PurchaseOrder order, IList<OrderLine> orderLines)
{
// Do stuff
}
}
}
namespace PointsAward
{
public class PointsUi : ViewEnabledControl<IEditCampaignItemView>, IConfigurable
{
public object New()
{
var pointsAward = new PointsAward();
pointsAward.CampaignItem = View.CampaignItem;
pointsAward.Save();
DataSource = pointsAward;
return DataSource;
}
public object DataSource { get; set; }
}
}
namespace PointsAward
{
class PointsAwardMappingTag : IContainsNHibernateMappingsTag
{ }
}
Creating a simple award - not able to save my choise
I've followed this guide, Add an award, and this, Save custom data in the database. I've created a table uCommerce_PointsAward, added tags to Custom.config and added a row to uCommerce_EntityUi which points at my usercontrol.
The award shows up in backend and I'm able to added it, but when I click save it disappears - see this video: http://screencast.com/t/U4wswe7I1VK
I'm not getting any errors - not even in the browser console.
Here is my code:
I notice that both the PointsAwardMappingTag and PointsAwardMap are not public. What happens if you change that for starters :) ?
is working on a reply...