public ActionResult DeleteConfirmed(Guid id)
        {
            GrantBudgetsType grantBudgetsType = db.GrantBudgetsTypes.Find(id);

            db.GrantBudgetsTypes.Remove(grantBudgetsType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: GrantBudgetsTypes/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GrantBudgetsType grantBudgetsType = db.GrantBudgetsTypes.Find(id);

            if (grantBudgetsType == null)
            {
                return(HttpNotFound());
            }
            return(View(grantBudgetsType));
        }
        public ActionResult Edit([Bind(Include = "GrantBudgetsTypeID,Name,Description")] GrantBudgetsTypeViewModel grantBudgetsTypeViewModel)
        {
            if (ModelState.IsValid)
            {
                GrantBudgetsType model = db.GrantBudgetsTypes.Find(grantBudgetsTypeViewModel.GrantBudgetsTypeID);

                model.Name        = grantBudgetsTypeViewModel.Name;
                model.Description = grantBudgetsTypeViewModel.Description;

                model.DateModified    = DateTime.Now;
                model.UserModifiedID  = Guid.Parse(User.Identity.GetUserId());
                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(grantBudgetsTypeViewModel));
        }
        public ActionResult Create([Bind(Include = "Name,Description")] GrantBudgetsType grantBudgetsType)
        {
            if (ModelState.IsValid)
            {
                grantBudgetsType.GrantBudgetsTypeID = Guid.NewGuid();

                grantBudgetsType.DateCreated  = DateTime.Now;
                grantBudgetsType.DateModified = grantBudgetsType.DateCreated;

                grantBudgetsType.UserCreatedID  = Guid.Parse(User.Identity.GetUserId());
                grantBudgetsType.UserModifiedID = grantBudgetsType.UserCreatedID;

                db.GrantBudgetsTypes.Add(grantBudgetsType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(grantBudgetsType));
        }