Пример #1
0
        public ActionResult _PreHeaterTimer(Device device)
        {
            if (MvcApplication.Scheduler.CheckExists(new JobKey("PreHeaterJob" + device.ID, "group1")))
            {
                //System.Diagnostics.Debug.WriteLine("true" + device.ID);
                ViewBag.TimerActive = "true";

                DateTimeOffset? dtoff = MvcApplication.Scheduler.GetTrigger(new TriggerKey("PreHeaterTrigger" + device.ID, "group1")).GetNextFireTimeUtc();
                //DateTime dt = dtoff.Value.ToLocalTime();
                //String s = dt.ToString("MM/dd/yyyy h:mm tt");
                ViewBag.TimerTime = dtoff.Value.ToLocalTime().ToString("dddd, MMM dd yyyy HH:mm", new CultureInfo("en-US"));
                //ViewBag.TimerTime = s;
            }
            else
            {
                //System.Diagnostics.Debug.WriteLine("false" + device.ID);
                ViewBag.TimerActive = "false";
            }

            ViewBag.ID = device.ID;
            ViewBag.IP = device.IpAddress;
            ViewBag.CommunityString = device.CommunityString;

            return PartialView(device);
        }
Пример #2
0
 public ActionResult _BasicControls(Device device)
 {
     ViewBag.ID = device.ID;
     ViewBag.IP = device.IpAddress;
     ViewBag.CommunityString = device.CommunityString;
     return PartialView(device);
 }