예제 #1
0
 public bool Equals(IDepartmentRule other)
 {
     if (other == null || !(other is DefaultDepartmentRule otherRule))
     {
         return(false);
     }
     return(NextDepartmentId == otherRule.NextDepartmentId && AddedStampId == otherRule.AddedStampId &&
            RemovedStampId == otherRule.RemovedStampId);
 }
예제 #2
0
 public ConditionDepartmentRule(int conditionStampId, int onConditionNextDepartmentId,
                                int elseConditionNextDepartmentId, int onConditionAddedStampId = 0, int onConditionRemovedStampId = 0,
                                int elseConditionAddedStampId = 0, int elseConditionRemovedStampId = 0)
 {
     ConditionStampId       = conditionStampId;
     OnConditionDefaultRule = new DefaultDepartmentRule(onConditionNextDepartmentId,
                                                        onConditionAddedStampId, onConditionRemovedStampId);
     ElseConditionDefaultRule = new DefaultDepartmentRule(elseConditionNextDepartmentId,
                                                          elseConditionAddedStampId, elseConditionRemovedStampId);
 }
예제 #3
0
 public bool Equals(IDepartmentRule other)
 {
     if (other == null || !(other is ConditionDepartmentRule otherRule))
     {
         return(false);
     }
     return(ConditionStampId == otherRule.ConditionStampId &&
            OnConditionDefaultRule.Equals(otherRule.OnConditionDefaultRule) &&
            ElseConditionDefaultRule.Equals(otherRule.ElseConditionDefaultRule));
 }
예제 #4
0
 public Department(int id, IDepartmentRule rule)
 {
     Id            = id;
     StampsHistory = new List <StampsHistoryElement>();
     Rule          = rule;
 }
예제 #5
0
 internal Department(int number, IDepartmentRule rule)
 {
     Number = number;
     Rule   = rule;
 }