public void changeMachine(string selectedValue)
        {
            this.maskin = this.allMachines().Where(s => s.Value == selectedValue).First().Text;
            this.Machno = int.Parse(selectedValue);
            DateTime timeNow = DateTime.Now;

            this.currShift = (from s in context.MachineShift where s.shiftbegtime <timeNow && s.shiftendtime> timeNow && s.DESCRIPTION == this.maskin select s).First();
            this.selShift  = this.currShift;
        }
        public loggedInUser(myuser user)
        {
            DateTime timeNow = DateTime.Now;

            this.errorText = "";
            this.currShift = (from s in context.MachineShift where s.shiftbegtime <timeNow && s.shiftendtime> timeNow && s.DESCRIPTION == user.startmaskin select s).First();
            this.selShift  = this.currShift;
            this.locked    = user.locked;
            this.username  = user.username;
            this.maskin    = user.startmaskin;
            this.userlevel = user.userlevel;
            this.Machno    = currShift.MACHNO;
            this.lastView  = "Home";
            this.winuser   = user.winuser;
        }