예제 #1
0
        public static JournalItem_View ItemToToView(JournalItem to)
        {
            var ret = new JournalItem_View();

            try
            {
                ret = new JournalItem_View()
                {
                    to          = to.date,
                    machineName = to.machineName,
                    username    = to.username,
                    RealName    = "",
                    purpose     = to.purpose
                };
            }
            catch (Exception e) { }
            return(ret);
        }
예제 #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);
        }