Пример #1
0
 partial void OnQuerySettings(object sender, BusinessRulesEventArgs <SDCaseFile> e)
 {
     e.SetQueryComputedField(SDCaseFile.PropertyNames.ExistFile, "iif(it.SDFile == null, false, true)");
     e.SetQueryComputedField(SDCaseFile.PropertyNames.FileStorage, "iif(it.SDFile != null, it.SDFile.FileStorage, null)");
     e.SetQueryComputedField(SDCaseFile.PropertyNames.FileName, "iif(it.SDFile != null, it.SDFile.FileName, null)");
     e.SetQueryComputedField(SDCaseFile.PropertyNames.FileThumbSizes, "iif(it.SDFile != null, it.SDFile.FileThumbSizes, null)");
 }
Пример #2
0
 partial void OnQuerySettings(object sender, BusinessRulesEventArgs <KstProject> e)
 {
     e.SetQueryComputedField(KstProject.PropertyNames.NumActivities,
                             $"it.{KstProject.PropertyNames.KstActivities}.Where({SFS.Core.Linq.Dynamic.IsNotDeleted}).Count()");
     //"it.KstActivities.Where(IsDeleted = null OR IsDeleted = false).Count()"
     e.SetQueryComputedField(KstProject.PropertyNames.NumUsers,
                             $"it.{KstProject.PropertyNames.KstProjectUsers}.Where({SFS.Core.Linq.Dynamic.IsNotDeleted}).Count()");
 }