예제 #1
0
        public JsonResult UpdateFolders(DateTime catalogDateTime, string rootFolderId)
        {
            var tree = new Tree();
            List<Item> result = GetContainer(rootFolderId, tree);

            UpdateMailboxesModel jsonModel = new UpdateMailboxesModel();
            jsonModel.CatalogTime = catalogDateTime;
            jsonModel.Details = result;

            return Json(jsonModel);
        }
예제 #2
0
 public JsonResult UpdateMailboxes(DateTime catalogDateTime)
 {
     UpdateMailboxesModel result = new UpdateMailboxesModel();
     result.CatalogTime = catalogDateTime;
     List<MailboxInfo> infos = new List<MailboxInfo>(24);
     for(int i = 0; i < 24; i++)
     {
         infos.Add(new MailboxInfo() { DisplayName = string.Format("DisplayName-{0}", i), MailAddress = string.Format("Address{0}@arcserve.com", i), RootFolderId = i.ToString() });
     }
     return Json(result);
 }
예제 #3
0
        public JsonResult UpdateMailboxes(DateTime catalogDateTime)
        {
            UpdateMailboxesModel result = new UpdateMailboxesModel();
            result.CatalogTime = catalogDateTime;

            var tree = new Tree();
            var allMailboxes = tree.GetAllMailbox();
            List<Item> infos = new List<Item>(allMailboxes.Count);
            foreach (var mailbox in allMailboxes)
            {
                infos.Add(new Item() { Id = mailbox.RootFolderId, DisplayName = mailbox.DisplayName, ChildCount = tree.GetChildCount(mailbox.RootFolderId), ItemType = "Mailbox", OtherInformation = mailbox});
            }

            result.Details = infos;
            return Json(result);
        }