This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace AyaNova.Biz
|
||||
{
|
||||
static class AyDataTypes
|
||||
public static class AyDataType
|
||||
{
|
||||
public const string Date = "date";
|
||||
public const string Text = "text";
|
||||
@@ -17,6 +17,12 @@ namespace AyaNova.Biz
|
||||
Key = key;
|
||||
}
|
||||
|
||||
public FilterOptions AddField(string FieldName, string LocaleKey, string DataType)
|
||||
{
|
||||
Flds.Add(new FilterField() { Fld = FieldName, Lt = LocaleKey, Type = DataType });
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class FilterField
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
//FILTEROPTIONS COLLECTION
|
||||
FilterOptions FilterOptions { get; set; }
|
||||
FilterOptions FilterOptions { get; }
|
||||
|
||||
|
||||
//VALIDATE FILTER?
|
||||
|
||||
@@ -14,8 +14,28 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
|
||||
internal class WidgetBiz : BizObject, IJobObject
|
||||
internal class WidgetBiz : BizObject, IJobObject, IFilterableObject
|
||||
{
|
||||
private FilterOptions filterOptions = null;
|
||||
public FilterOptions FilterOptions
|
||||
{
|
||||
get
|
||||
{
|
||||
if (filterOptions == null)
|
||||
{
|
||||
filterOptions = new FilterOptions("Widget");
|
||||
filterOptions.
|
||||
AddField("Name", "WidgetName", AyDataType.Text).
|
||||
AddField("Serial", "WidgetSerial", AyDataType.Text).
|
||||
AddField("DollarAmount", "WidgetDollarAmount", AyDataType.Decimal).
|
||||
AddField("Active", "WidgetActive", AyDataType.Bool).
|
||||
AddField("StartDate", "WidgetStartDate", AyDataType.Date).
|
||||
AddField("EndDate", "WidgetEndDate", AyDataType.Date);
|
||||
|
||||
}
|
||||
return filterOptions;
|
||||
}
|
||||
}
|
||||
|
||||
internal WidgetBiz(AyContext dbcontext, long currentUserId, long userLocaleId, AuthorizationRoles UserRoles)
|
||||
{
|
||||
@@ -78,7 +98,7 @@ namespace AyaNova.Biz
|
||||
EventLogProcessor.LogEventToDatabase(new Event(UserId, outObj.Id, BizType, AyaEvent.Created), ct);
|
||||
|
||||
//SEARCH INDEXING
|
||||
Search.ProcessNewObjectKeywords( UserLocaleId, outObj.Id, BizType, outObj.Name, outObj.Notes, outObj.Name, outObj.Serial.ToString());
|
||||
Search.ProcessNewObjectKeywords(UserLocaleId, outObj.Id, BizType, outObj.Name, outObj.Notes, outObj.Name, outObj.Serial.ToString());
|
||||
|
||||
return outObj;
|
||||
|
||||
@@ -225,7 +245,7 @@ namespace AyaNova.Biz
|
||||
EventLogProcessor.LogEventToDatabase(new Event(UserId, dbObj.Id, BizType, AyaEvent.Modified), ct);
|
||||
|
||||
//Update keywords
|
||||
Search.ProcessUpdatedObjectKeywords( UserLocaleId, dbObj.Id, BizType, dbObj.Name, dbObj.Notes, dbObj.Name, dbObj.Serial.ToString());
|
||||
Search.ProcessUpdatedObjectKeywords(UserLocaleId, dbObj.Id, BizType, dbObj.Name, dbObj.Notes, dbObj.Name, dbObj.Serial.ToString());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -248,7 +268,7 @@ namespace AyaNova.Biz
|
||||
EventLogProcessor.LogEventToDatabase(new Event(UserId, dbObj.Id, BizType, AyaEvent.Modified), ct);
|
||||
|
||||
//Update keywords
|
||||
Search.ProcessUpdatedObjectKeywords( UserLocaleId, dbObj.Id, BizType, dbObj.Name, dbObj.Notes, dbObj.Name, dbObj.Serial.ToString());
|
||||
Search.ProcessUpdatedObjectKeywords(UserLocaleId, dbObj.Id, BizType, dbObj.Name, dbObj.Notes, dbObj.Name, dbObj.Serial.ToString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user