This commit is contained in:
@@ -49,7 +49,6 @@ namespace Sockeye.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||||
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
|
||||||
await ct.GZCase.AddAsync(newObject);
|
await ct.GZCase.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
||||||
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
||||||
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
|
|
||||||
await ValidateAsync(putObject, dbObject);
|
await ValidateAsync(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
@@ -195,8 +193,7 @@ namespace Sockeye.Biz
|
|||||||
.AddText(obj.Name)
|
.AddText(obj.Name)
|
||||||
.AddText(obj.Wiki)
|
.AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags)
|
||||||
.AddText(obj.Notes)
|
.AddText(obj.Notes);
|
||||||
.AddCustomFields(obj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -218,8 +215,6 @@ namespace Sockeye.Biz
|
|||||||
//validate users choices for required non custom fields
|
//validate users choices for required non custom fields
|
||||||
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
||||||
|
|
||||||
//validate custom fields
|
|
||||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ namespace Sockeye.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||||
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
|
||||||
await ct.License.AddAsync(newObject);
|
await ct.License.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
||||||
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
||||||
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
|
|
||||||
await ValidateAsync(putObject, dbObject);
|
await ValidateAsync(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
@@ -197,8 +195,7 @@ namespace Sockeye.Biz
|
|||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags)
|
||||||
.AddText(obj.FetchEmail)
|
.AddText(obj.FetchEmail)
|
||||||
.AddText(obj.Key)
|
.AddText(obj.Key)
|
||||||
.AddText(obj.RegTo)
|
.AddText(obj.RegTo);
|
||||||
.AddCustomFields(obj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -220,8 +217,6 @@ namespace Sockeye.Biz
|
|||||||
//validate users choices for required non custom fields
|
//validate users choices for required non custom fields
|
||||||
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
||||||
|
|
||||||
//validate custom fields
|
|
||||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ namespace Sockeye.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||||
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
|
||||||
await ct.Product.AddAsync(newObject);
|
await ct.Product.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
||||||
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
||||||
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
|
|
||||||
await ValidateAsync(putObject, dbObject);
|
await ValidateAsync(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
@@ -195,8 +193,7 @@ namespace Sockeye.Biz
|
|||||||
.AddText(obj.Name)
|
.AddText(obj.Name)
|
||||||
.AddText(obj.Wiki)
|
.AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags)
|
||||||
.AddText(obj.OurCode)
|
.AddText(obj.OurCode);
|
||||||
.AddCustomFields(obj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -218,8 +215,6 @@ namespace Sockeye.Biz
|
|||||||
//validate users choices for required non custom fields
|
//validate users choices for required non custom fields
|
||||||
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
||||||
|
|
||||||
//validate custom fields
|
|
||||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ namespace Sockeye.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||||
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
|
||||||
await ct.Purchase.AddAsync(newObject);
|
await ct.Purchase.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
||||||
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
||||||
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
|
|
||||||
await ValidateAsync(putObject, dbObject);
|
await ValidateAsync(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
@@ -196,8 +194,7 @@ namespace Sockeye.Biz
|
|||||||
.AddText(obj.Wiki)
|
.AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags)
|
||||||
.AddText(obj.PurchaseNotes)
|
.AddText(obj.PurchaseNotes)
|
||||||
.AddText(obj.VendorData)
|
.AddText(obj.VendorData);
|
||||||
.AddCustomFields(obj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -219,8 +216,6 @@ namespace Sockeye.Biz
|
|||||||
//validate users choices for required non custom fields
|
//validate users choices for required non custom fields
|
||||||
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
||||||
|
|
||||||
//validate custom fields
|
|
||||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ namespace Sockeye.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||||
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
|
||||||
await ct.SubscriptionServer.AddAsync(newObject);
|
await ct.SubscriptionServer.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
||||||
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
||||||
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
|
|
||||||
await ValidateAsync(putObject, dbObject);
|
await ValidateAsync(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
@@ -201,8 +199,7 @@ namespace Sockeye.Biz
|
|||||||
.AddText(obj.OperatingSystem)
|
.AddText(obj.OperatingSystem)
|
||||||
.AddText(obj.CustomerSubDomain)
|
.AddText(obj.CustomerSubDomain)
|
||||||
.AddText(obj.Wiki)
|
.AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags);
|
||||||
.AddCustomFields(obj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -224,8 +221,6 @@ namespace Sockeye.Biz
|
|||||||
//validate users choices for required non custom fields
|
//validate users choices for required non custom fields
|
||||||
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
||||||
|
|
||||||
//validate custom fields
|
|
||||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ namespace Sockeye.Models
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { get; set; }
|
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
public GZCase()
|
public GZCase()
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ namespace Sockeye.Models
|
|||||||
public DateTime MaintenanceExpire { get; set; }
|
public DateTime MaintenanceExpire { get; set; }
|
||||||
|
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { get; set; }
|
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
//workaround for notification
|
//workaround for notification
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ namespace Sockeye.Models
|
|||||||
public string VendorCode { get; set; }
|
public string VendorCode { get; set; }
|
||||||
public string OurCode { get; set; }
|
public string OurCode { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { get; set; }
|
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
public Product()
|
public Product()
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ namespace Sockeye.Models
|
|||||||
public string VendorData { get; set; }
|
public string VendorData { get; set; }
|
||||||
public DateTime? ProcessedDate { get; set; }
|
public DateTime? ProcessedDate { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { get; set; }
|
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
//workaround for notification
|
//workaround for notification
|
||||||
[NotMapped, JsonIgnore]
|
[NotMapped, JsonIgnore]
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ namespace Sockeye.Models
|
|||||||
public long? CustomerId { get; set; }
|
public long? CustomerId { get; set; }
|
||||||
public long? LicenseId { get; set; }
|
public long? LicenseId { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { 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