Exemplo n.º 1
0
        /// <summary>
        /// Gets the JobHistory and returns the JobHistorySingle view.
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <param name="Id"></param>
        /// <returns></returns>
        public ActionResult JobHistorySingle(string mediaServer, string Id)
        {
            Trace.WriteLine("Entering JobHistorySingle method");
            try
            {
                ViewBag.Id = Id;
                var jobHistories = DocumentDBDataController.GetJobHistories(mediaServer);

                ViewBag.Mediaserver = mediaServer;
                return(View(jobHistories));
            }
            catch (Exception ex)
            {
                Trace.TraceError("Error:" + ex.Message);
                return(View("Error"));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets Job Histories by Type for given media server and returns JobHistory partial view.
        /// </summary>
        /// <param name="JobType"></param>
        /// <param name="media"></param>
        /// <returns></returns>
        public ActionResult GetJobHistoryType(string JobType, string media)
        {
            Trace.WriteLine("Entering GetJobHistoryType method");
            ModelState.Clear();
            ViewBag.Name   = "Name";
            ViewBag.Status = "Status";
            ViewBag.Type   = JobType;
            if (JobType.Equals("All"))
            {
                var jobHistories2 = DocumentDBDataController.GetJobHistories(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories2));
            }
            var jobsHistories1 = DocumentDBDataController.GetJobHistoryByJobType(JobType, media);

            ViewBag.Mediaserver = media;
            return(PartialView("JobHistory", jobsHistories1));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the Job Histories for the given media server and returns JobHistory View.
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <returns></returns>
        public ActionResult JobHistory(string mediaServer)
        {
            Trace.WriteLine("Entering JobHistory method");
            ViewBag.DateSortParm = "date_desc";
            if (ViewBag.Name == null)
            {
                ViewBag.Name = "Name";
            }
            if (ViewBag.Status == null)
            {
                ViewBag.Status = "Status";
            }
            if (ViewBag.Type == null)
            {
                ViewBag.Type = "Type";
            }
            var jobHistories = DocumentDBDataController.GetJobHistories(mediaServer);

            ViewBag.Mediaserver = mediaServer;
            return(View(jobHistories));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Gets the Job Histories in ascending or decending order (of End Date) and returns Job History partial view.
        /// </summary>
        /// <param name="sortOrder"></param>
        /// <param name="media"></param>
        /// <returns></returns>
        public ActionResult GetSortedEndDate(string sortOrder, string media)
        {
            Trace.WriteLine("Entering GetSortedEndDate method");
            ViewBag.DateSortParm = sortOrder == "Date" ? "date_desc" : "Date";
            switch (sortOrder)
            {
            case "Date":
                var jobHistories1 = DocumentDBDataController.GetJobHistories(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories1));

            case "date_desc":
                var jobHistories2 = DocumentDBDataController.GetEndDateInDescOrder(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories2));

            default:
                var jobHistories = DocumentDBDataController.GetEndDateInDescOrder(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories));
            }
        }