예제 #1
0
        public ActionResult Create(Feature feature)
        {
            if (ModelState.IsValid)
            {
                db.Features.Add(feature);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(feature));
        }
예제 #2
0
        public ActionResult Create(Events events)
        {
            if (ModelState.IsValid)
            {
                db.Events1.Add(events);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(events));
        }
예제 #3
0
        public ActionResult Create(DonationTypeID donationtypeid)
        {
            if (ModelState.IsValid)
            {
                db.DonationTypeIDs.Add(donationtypeid);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(donationtypeid));
        }
예제 #4
0
        public ActionResult Create(Employee employee)
        {
            if (ModelState.IsValid)
            {
                db.Employees.Add(employee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(employee));
        }
예제 #5
0
        public ActionResult Create(Campaign campaign)
        {
            if (ModelState.IsValid)
            {
                db.Campaigns.Add(campaign);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(campaign));
        }
예제 #6
0
        public ActionResult Create(User user)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }
        public ActionResult Create(FundraisingTask fundraisingtask)
        {
            if (ModelState.IsValid)
            {
                db.FundraisingTasks.Add(fundraisingtask);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Campaign = new SelectList(db.Campaigns, "ID", "Name", fundraisingtask.Campaign);
            return(View(fundraisingtask));
        }
예제 #8
0
        public ActionResult Create(Permission permission)
        {
            if (ModelState.IsValid)
            {
                db.Permissions.Add(permission);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.FeatureID = new SelectList(db.Features, "FeatureID", "FeatureName", permission.FeatureID);
            ViewBag.UserLogin = new SelectList(db.Users, "UserLogin", "Pswd", permission.UserLogin);
            return(View(permission));
        }
예제 #9
0
        public ActionResult Create(Donation donation)
        {
            if (ModelState.IsValid)
            {
                db.Donations.Add(donation);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.DonationType = new SelectList(db.DonationTypeIDs, "DonationTypeID1", "DonationDesc", donation.DonationType);
            ViewBag.DonorID      = new SelectList(db.Donors, "DonorID", "FastName", donation.DonorID);
            return(View(donation));
        }