Exemplo n.º 1
0
      public ActionResult CreateStatus(EmployeeStatusCreateForm form)
      {
          try
          {
              if (ModelState.IsValid)
              {
                  int SelectedEmployeeState      = Int32.Parse(form.SelectedEmployeeState);
                  EEmployeeStateService  emprepo = new EEmployeeStateService();
                  Employee_EmployeeState es      = new Employee_EmployeeState()
                  {
                      EmployeeId      = UserSession.CurrentUser.Id,
                      EmployeeStateId = Int32.Parse(form.SelectedEmployeeState),
                      StartDate       = form.StartDate,
                      EndDate         = form.EndDate
                  };
                  es = emprepo.Insert(es);
                  return(RedirectToAction("ProfilDetail"));
              }
              return(View(form));
          }

          catch
          {
              return(View());
          }
      }
Exemplo n.º 2
0
      // GET: MEMBER/CreateStatus
      public ActionResult CreateStatus()
      {
          EmployeeStateService     repo = new EmployeeStateService();
          EmployeeStatusCreateForm e    = new EmployeeStatusCreateForm(repo.Get());

          return(View(e));
      }