コード例 #1
0
 public ActionResult GetPropertyIdForDeviceId(Guid DeviceId)
 {
     try
     {
         Domain.Profile.ProfileDomain pd = new Domain.Profile.ProfileDomain();
         var sonuc = pd.GetPropertyListForDevice(DeviceId);
         return(Json(sonuc, JsonRequestBehavior.AllowGet));
     }
     catch (Exception)
     {
         return(Json(false, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #2
0
 public ActionResult Create()
 {
     Domain.Device.DeviceDomain dd = new Domain.Device.DeviceDomain();
     if (this.ControllerContext.HttpContext.Request.Cookies.AllKeys.Contains("UserCookie"))
     {
         HttpCookie cookie = this.ControllerContext.HttpContext.Request.Cookies["UserCookie"];
         int        UserId = Convert.ToInt32(cookie.Values["Id"]);
         ViewBag.Devices = dd.GetDeviceList(UserId);
         Domain.Profile.ProfileDomain pd = new Domain.Profile.ProfileDomain();
         ViewBag.Properties = pd.GetPropertyList();
     }
     return(View());
 }
コード例 #3
0
 public ActionResult Edit(int Id)
 {
     Domain.Device.DeviceDomain  dd    = new Domain.Device.DeviceDomain();
     Domain.Alarm.DTOs.AlarmList Alarm = new Domain.Alarm.DTOs.AlarmList();
     if (this.ControllerContext.HttpContext.Request.Cookies.AllKeys.Contains("UserCookie"))
     {
         HttpCookie cookie = this.ControllerContext.HttpContext.Request.Cookies["UserCookie"];
         int        UserId = Convert.ToInt32(cookie.Values["Id"]);
         ViewBag.Devices = dd.GetDeviceList(UserId);
         Domain.Profile.ProfileDomain pd = new Domain.Profile.ProfileDomain();
         ViewBag.Property = pd.GetPropertyList();
     }
     Domain.Alarm.AlarmDomain ad = new Domain.Alarm.AlarmDomain();
     return(View(ad.GetAlarmById(Id)));
 }
コード例 #4
0
        public ActionResult Create()
        {
            Domain.Profile.ProfileDomain         pd = new Domain.Profile.ProfileDomain();
            Domain.Environment.EnvironmentDomain ed = new Domain.Environment.EnvironmentDomain();
            int UserId = 0;

            if (this.ControllerContext.HttpContext.Request.Cookies.AllKeys.Contains("UserCookie"))
            {
                HttpCookie cookie = this.ControllerContext.HttpContext.Request.Cookies["UserCookie"];
                UserId = Convert.ToInt32(cookie.Values["Id"]);
            }

            ViewBag.Profiller   = pd.GetProfileList();
            ViewBag.Environment = ed.GetAll(UserId);

            return(View());
        }
コード例 #5
0
        public ActionResult Edit(Guid Id)
        {
            Domain.Profile.ProfileDomain         pd = new Domain.Profile.ProfileDomain();
            Domain.Environment.EnvironmentDomain ed = new Domain.Environment.EnvironmentDomain();
            int UserId = 0;

            if (this.ControllerContext.HttpContext.Request.Cookies.AllKeys.Contains("UserCookie"))
            {
                HttpCookie cookie = this.ControllerContext.HttpContext.Request.Cookies["UserCookie"];
                UserId = Convert.ToInt32(cookie.Values["Id"]);
            }

            ViewBag.Profiller   = pd.GetProfileList();
            ViewBag.Environment = ed.GetAll(UserId);

            Domain.Device.DeviceDomain    dd         = new Domain.Device.DeviceDomain();
            Domain.Device.DTOs.DeviceRead DeviceRead = dd.GetDeviceById(Id);

            return(View(DeviceRead));
        }