public ActionResult Create()
 {
     try
     {
         ViewBag.QA       = reposatoryQuestions.GetAll().Select(m => new { ID = m.ID, Code = m.Code + "->" + m.Question });
         ViewBag.elements = reposatoryElements.GetAll().Select(m => new { ID = m.ID, Code = m.Code + "->" + m.Name });
         var stru    = reposatorystructure.find(ChModels.Personnel).Structure_Code;
         var ALLList = reposatoryEvaluationPerformance.GetAll();
         var model   = new PerformanceEvaluationGroup();
         if (ALLList.Count() == 0)
         {
             model.Code = stru + "1";
         }
         else
         {
             model.Code = stru + (ALLList.LastOrDefault().ID + 1).ToString();
         }
         return(View(model));
     }
     catch (Exception)
     {
         TempData["Message"] = HR.Resource.pers_2.Faild;
         return(RedirectToAction("index"));
     }
 }
 public ActionResult Index()
 {
     try
     {
         var list = reposatoryelement.GetAll();
         if (list != null)
         {
             return(View(list));
         }
         else
         {
             TempData["Message"] = HR.Resource.pers_2.Faild; return(View());
         }
     }
     catch (Exception)
     {
         TempData["Message"] = HR.Resource.pers_2.Faild;
         return(View());
     }
 }