Exemplo n.º 1
0
 public void Create_History(int module , string part, 
     DateTime date)
 {
     Breakdown_history history = new Breakdown_history
        {
        Module = module,
        Part = part,
        date = date
        };
        if (!ContainsHistory(history))
        {
        History.Add(history);
        }
 }
Exemplo n.º 2
0
        public void Create_History(int module, string part,
                                   DateTime date)
        {
            Breakdown_history history = new Breakdown_history
            {
                Module = module,
                Part   = part,
                date   = date
            };

            if (!ContainsHistory(history))
            {
                History.Add(history);
            }
        }
Exemplo n.º 3
0
        private bool ContainsHistory(Breakdown_history target)
        {
            int count = 0;

            for (int i = 0; i < History.Count; i++)
            {
                if (History[i].Equals(target))
                {
                    count++;
                }
            }
            if (count == 0)
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 4
0
 private bool ContainsHistory( Breakdown_history target)
 {
     int count = 0;
     for (int i = 0; i < History.Count; i++)
     {
         if (History[i].Equals(target))
         {
             count++;
         }
     }
     if (count==0)
     {
         return false;
     }
     return true;
 }