Example #1
0
        //Ask the user for more information
        public void moreInfo(string info, int id)
        {
            var approv = db.Grant_Daily.FirstOrDefault(x => x.AdminDailyID == id);

            approv.MoreInformationFlag = true;
            approv.AdminNotes          = info;
            db.SaveChanges();
            Notifcation requestMore = new Notifcation();

            requestMore.MoreInformation(id);
        }
Example #2
0
        public ActionResult Create(Grant_Daily grant_daily)
        {
            var errors = ModelState.Values.SelectMany(v => v.Errors);

            ViewBag.GrantTypeID = new SelectList(db.Grant_GrantType, "GrantTypeID", "GrantType");
            ViewBag.UserID      = (string)System.Web.HttpContext.Current.Session["AppEntityID"];

            if (ModelState.IsValid)
            {
                db.Grant_Daily.AddObject(grant_daily);
                db.SaveChanges();
                Notifcation mail = new Notifcation();
                mail.NewActivity();
                return(RedirectToAction("Details", new { id = grant_daily.AdminDailyID }));
            }

            ViewBag.GrantTypeID = new SelectList(db.Grant_GrantType, "GrantTypeID", "GrantType", grant_daily.GrantTypeID);
            return(View(grant_daily));
        }