Example #1
0
 public void AddAminAlgoRule(string localID, XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule model)
 {
     if (AdminAlgoes.ContainsKey(localID))
     {
         AdminAlgoes[localID] = model;
     }
     else
     {
         AdminAlgoes.Add(localID, model);
     }
 }
Example #2
0
        public XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule GetAminAlgoRule(string localID)
        {
            if (AdminAlgoes.ContainsKey(localID))
            {
                return(AdminAlgoes[localID]);
            }
            else
            {
                var newAlgo = new XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule();
                AdminAlgoes.Add(localID, newAlgo);

                return(newAlgo);
            }
        }
Example #3
0
        public void RemoveFullCase(string localID)
        {
            var has = CPCases.Any(cp => cp.Key.Equals(localID));

            if (has)
            {
                CPCases.Remove(localID);
                AdminAlgoes.Remove(localID);
                AdminRules.Remove(localID);
            }
            else
            {
                CLCases.Remove(localID);
                MixedAlgoes.Remove(localID);
                MixedRules.Remove(localID);
            }

            var localClass = LocalCases.FirstOrDefault(lc => lc.LocalID.Equals(localID));

            if (localClass != null)
            {
                LocalCases.Remove(localClass);
            }
        }