Beispiel #1
0
        public ActionResult AddDonation(int id)
        {
            DONOR donor = drRepo.FindById(id);

            ViewBag.DonorId   = id;
            ViewBag.DonorName = donor.FName;
            //CreateDonationViewModel cdvm = new CreateDonationViewModel();
            //cdvm.donor = donor;

            ViewBag.TypeOf = new SelectList(ddlData.TYPEOF, "TypeOf", "TypeOf");

            ViewBag.GiftMethod = new SelectList(ddlData.GIFTMETHOD, "GiftMethod", "GiftMethod");

            ViewBag.Fund = new SelectList(ddlData.FUNDS, "Fund", "Fund");

            ViewBag.GL = new SelectList(ddlData.GLS, "GL", "GL");

            ViewBag.Department = new SelectList(ddlData.DEPARTMENTS, "Department", "Department");

            ViewBag.Program = new SelectList(ddlData.PROGRAMS, "Program", "Program");

            ViewBag.Grant = new SelectList(ddlData.GRANTS, "GrantName", "GrantName");

            return(View("~/Views/DONATIONs/DonorCreate.cshtml"));//, cdvm
        }
Beispiel #2
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            DONOR donor = drRepo.FindById(Convert.ToInt32(id));

            if (donor == null)
            {
                return(HttpNotFound());
            }

            ViewBag.CONTACTID = new SelectList(ddlData.CONTACT, "CONTACTID", "TYPEOF", donor.ContactId);
            ViewBag.MARKERID  = new SelectList(ddlData.IDENTITYMARKER, "MARKERID", "MARKERTYPE", donor.MarkerId);
            ViewBag.Gender    = new SelectList(ddlData.GENDER, "Gender", "Gender", donor.Gender);

            return(View(donor));
        }