Exemplo n.º 1
0
        public ActionResult Create(Department newDepartment)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    serviceClient.AddDepartment(newDepartment);
                    return(RedirectToAction("Index", "Department"));
                }

                // TODO: Add insert logic here

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 2
0
        public static void AddDepartment(Department d)
        {
            var newDepartment = proxy.AddDepartment(d);

            AddDepartmentNotification?.Invoke(typeof(ServiceDataProvider), new DepartmentEventArgs(newDepartment));
        }