public ActionResult Create()
        {
            string author = GetEmployeeId();
            CreateExpanseReportViewModels report = new CreateExpanseReportViewModels();

            report.Author_ID    = author;
            report.CreationDate = DateTime.Now;
            report.StatusCode   = 0;

            return(View(report));
        }
        public ActionResult Create(CreateExpanseReportViewModels model)
        {
            if (model.DateReport > DateTime.Now)
            {
                ModelState.AddModelError("DateReport", "Vous ne pouvez pas créer des notes de frais pour un mois dans le future");
            }

            if (model.Author_ID != model.Employee_ID && model.Employee.Pole.ManagerId != model.Author_ID)
            {
                ModelState.AddModelError("Employee_ID", "Vous n'êtes pas le manager de cette employee");
            }

            if (ModelState.IsValid)
            {
                model.Month = model.DateReport.Month;
                model.Year  = model.DateReport.Year;

                Service.Add(model);

                return(RedirectToAction("Index"));
            }

            return(View("Create", model));
        }