public ActionResult Register(DonorTB Donor) { Donorrep.Insert(Donor); if ((Session["DonateID"] != null)) { Donor.DonateID = Convert.ToInt32(Session["DonateID"]); } return(RedirectToAction(nameof(DonationDetails), new { DTB.DonateID })); }
// GET: Donor public ActionResult DonorDashboard(DonorTB donor) { if ((Session["DonorID"] != null)) { //donor.DonorID = Convert.ToInt32(Session["DonorID"]); return(View()); } else { return(RedirectToAction("Register", "Home")); } }
public ActionResult Register(DonorTB Donor) { if ((Session["DonateID"] != null)) { Donor.DonateID = Convert.ToInt32(Session["DonateID"]); Donorrep.Insert(Donor); Session["DonorID"] = Donor.DonorID; return(RedirectToAction("DonorDashboard", "Donor", new { Donor.DonorID })); } else { Session["DonorID"] = Donor.DonorID; Donorrep.Insert(Donor); return(RedirectToAction("Login")); } }