public ActionResult QGreetings(int EmpId)
        {

            

            DataBaseManager db = new DataBaseManager();
            
            if (db.IsVoiting2(EmpId))
            {
                SetEmployeeModel m = new SetEmployeeModel();
                m.ErrorMsg = "Вы уже заполнили анкету";

                return View("Index", m);
            }
            Models.QuestionsModel mod = new Models.QuestionsModel();
            mod.Empl = db.GetEmployeeById(EmpId);
            if (mod.Empl == null)
            {
                SetEmployeeModel m = new SetEmployeeModel();
                m.ErrorMsg = "Неверный код";

                return View("Index", m);
            }
            mod.NotRight = false;
            return View("QGreetings", mod);
        }
        public ActionResult Questions(string Num)
        {
            int mNum = 0;
            if (!Int32.TryParse(Num,out mNum))
            {
                SetEmployeeModel m = new SetEmployeeModel();
                m.ErrorMsg = "Ведите корректный код";

                return View("Index", m);
            }


        //    return QGreetings(mNum);
          
            DataBaseManager db = new DataBaseManager();

            if (db.IsVoiting(mNum))
            {
                SetEmployeeModel m = new SetEmployeeModel();
                m.ErrorMsg = "Вы уже заполнили анкету";

                return View("Index", m);
            }

            Models.QuestionsModel mod = new Models.QuestionsModel();



            mod.Empl = db.GetEmployeeById(mNum);
            if (mod.Empl == null)
            {
                SetEmployeeModel m = new SetEmployeeModel();
                m.ErrorMsg = "Неверный код";
                
                return View("Index",m);
            }
            mod.Questions = db.GetQuestionsByAnketaId();
            mod.NotRight = false;
            mod.AnswerTypes = db.AnswerType();
            return View(mod);
          
        }
 public ActionResult Index()
 {
     SetEmployeeModel m = new SetEmployeeModel();
     return View(m);
 }