private void reinitMachinesList() { machines.Clear(); foreach (var itemView in viewItems) { var pc = pcmap.GetViewName(itemView.machineView); if (!machines.Contains(pc)) { machines.Add(pc); } } }
public static JournalItem_View ItemsToView(JournalItem from, JournalItem to, namemap namemap, pcmap pcmap) { var ret = new JournalItem_View(); try { ret = new JournalItem_View() { from = from.date, to = to.date, duration = to.date - from.date, machineName = pcmap.GetViewName(from.machineName), username = namemap.GetName(from.username), RealName = "", purpose = from.purpose, isValid = from.isValid && to.isValid }; } catch (Exception e) { } return(ret); }