/// <summary> /// Deletes all. /// </summary> /// <param name="IncidentBoxId">The incident box id.</param> public static void DeleteAll(int IncidentBoxId) { using (DbTransaction tran = DbTransaction.Begin()) { foreach (IncidentBoxRule rule in IncidentBoxRule.List(IncidentBoxId)) { IncidentBoxRule.Delete(rule.IncidentBoxRuleId); } tran.Commit(); } }
/// <summary> /// Evaluates the specified incident box id. /// </summary> /// <param name="IncidentBoxId">The incident box id.</param> /// <returns></returns> public static bool Evaluate(int IncidentBoxId, IncidentInfo incidentInfo) { IncidentBoxRule[] ruleList = IncidentBoxRule.List(IncidentBoxId); if (ruleList.Length == 0) { return(false); } int Index = 0; return(EvaluateBlock(true, string.Empty, incidentInfo, ruleList, ref Index)); }