Esempio n. 1
0
        public ActionResult DDSFreq()
        {
            /* Check so that you are logged in
             * and not trying to reach this the wrong way */

            if (Session["user"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                loggedInUser user = Session["user"] as loggedInUser;

                //Check so the user is the correct userlevel to access admin
                if (user.userlevel != "rst")
                {
                    return(RedirectToAction("Index", user.lastView));
                }

                //If there is an Errortext return the ErrorView
                if (user.errorText != "")
                {
                    ViewBag.errorText = user.errorText;
                    user.errorText    = "";
                    return(View("ErrorView"));
                }

                user.lastView = "Admin";
                user.updateShift();
                var allActiveMachineSettings = new SettingFrequensFunctions();
                return(View(allActiveMachineSettings.getAllConnections(user.Machno)));
            }
        }
Esempio n. 2
0
        public void setWeekSettingFrequens(int id, byte weekFreq)
        {
            var allActiveMachineSettings = new SettingFrequensFunctions();

            allActiveMachineSettings.updateDbWeekSettingFrequens(id, weekFreq);
        }
Esempio n. 3
0
        public void setActiveSettingFrequens(int id, byte shortShift, byte active)
        {
            var allActiveMachineSettings = new SettingFrequensFunctions();

            allActiveMachineSettings.updateDbSettingFrequensActive(id, shortShift, active);
        }