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); } }
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); } }
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); }
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; }