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))); } }
public void setWeekSettingFrequens(int id, byte weekFreq) { var allActiveMachineSettings = new SettingFrequensFunctions(); allActiveMachineSettings.updateDbWeekSettingFrequens(id, weekFreq); }
public void setActiveSettingFrequens(int id, byte shortShift, byte active) { var allActiveMachineSettings = new SettingFrequensFunctions(); allActiveMachineSettings.updateDbSettingFrequensActive(id, shortShift, active); }