This commit is contained in:
@@ -365,6 +365,9 @@ namespace AyaNova.Biz
|
|||||||
//Can save or update?
|
//Can save or update?
|
||||||
private void Validate(Widget proposedObj, Widget currentObj)
|
private void Validate(Widget proposedObj, Widget currentObj)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//NOTE: In DB schema only name and serial are not nullable
|
||||||
|
|
||||||
//run validation and biz rules
|
//run validation and biz rules
|
||||||
bool isNew = currentObj == null;
|
bool isNew = currentObj == null;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
namespace AyaNova.Models
|
namespace AyaNova.Models
|
||||||
{
|
{
|
||||||
|
|
||||||
//Test class for development
|
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal, otherwise the server will call it an invalid record if the field isn't sent from client
|
||||||
|
//NOTE: In Widget DB schema only name and serial are not nullable
|
||||||
public partial class Widget
|
public partial class Widget
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
@@ -22,7 +23,7 @@ namespace AyaNova.Models
|
|||||||
public DateTime? StartDate { get; set; }
|
public DateTime? StartDate { get; set; }
|
||||||
public DateTime? EndDate { get; set; }
|
public DateTime? EndDate { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public int Count { get; set; }
|
public int? Count { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user