Esempio n. 1
0
        public ActionResult CreateDepartment(int id, dept dept)
        {
            string projDesc = projectInfo.returnProjectDescription(id);

            if (TryUpdateModel(dept))
            {
                _ctx.depts.Add(dept);
                _ctx.SaveChanges();
                return RedirectToAction("Index", new { searchTerm = projDesc });
            }
            return View(dept);
        }
Esempio n. 2
0
        // Add Department Record
        public ActionResult CreateDepartment()
        {
            dept model = new dept
            {
                dept_desc   = string.Empty ,
                createdby   = User.Identity.Name.Replace("GREENSPOONMARDE\\", ""),
                createddate = DateTime.Now
            };

            return PartialView("_CreateDepartment", model);
        }