public ActionResult Create(DepartmentViewModel dvm)
        {
            try
            {
                activeUser = userBll.GetUserById((long)HttpContext.Session.GetInt32("userId"));
                ViewData["sessionData"] = new int?[] { HttpContext.Session.GetInt32("admin"), HttpContext.Session.GetInt32("language") };

                if (activeUser.Administrator > 0)
                {
                    Department department = new Department
                    {
                        Name           = dvm.Name,
                        DepartmentCode = dvm.DepartmentCode,
                        FloorId        = dvm.FloorId,
                        Svg            = dvm.Svg
                    };

                    departmentBll.CreateDepartment(department);
                    long departmentId = departmentBll.ShowAllDepartments().FirstOrDefault(d => d.DepartmentCode == department.DepartmentCode).DepartmentId;

                    for (int i = 1; i < dvm.NumberOfDesks + 1; i++)
                    {
                        FlexDesk desk = new FlexDesk();
                        desk.DepartmentId = departmentId;
                        desk.FlexDeskCode = department.DepartmentCode + i.ToString("000");;
                        desk.Name         = department.Name + " " + i.ToString("000");
                        flexDeskBll.CreateFlexDesk(desk);
                    }
                }

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(RedirectToAction(nameof(Index)));
            }
        }
 //implementatie REST protocol voor met de JSON code langs front-end overweg te kunnen [FromBody]
 //Het [FromBody] attribuut zal gebruikt worden om het content type te bepalen
 public void Post([FromBody] Department department)
 {
     departmentBll.CreateDepartment(department);
 }
 public void Post([FromBody] Department department)
 {
     //departmentProcessor.Create(department);
     departmentBll.CreateDepartment(department);
 }