Example #1
0
 private void reinitUsersList()
 {
     users.Clear();
     foreach (var itemView in viewItems)
     {
         var nm = namemap.GetName(itemView.nameView);
         if (!users.Contains(nm))
         {
             users.Add(nm);
         }
     }
 }
Example #2
0
        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);
        }