예제 #1
0
        public ActionResult Details(SupplementaryDividend sD)
        {
            if (Session["FromCSN"] == null)
            {
                return(Redirect("../forms"));
            }

            sD.UserId         = int.Parse(Session["UserId"].ToString());
            sD.FromCSN        = Session["FromCSN"].ToString();
            sD.ToCSN          = Session["ToCSN"].ToString();
            sD.ISIN           = Session["ISIN"].ToString();
            sD.TransferAmount = double.Parse(Session["TransferAmount"].ToString());

            sD.CreatedById = int.Parse(Session["UserId"].ToString());
            sD.CreatedDate = System.DateTime.Now;

            //save to db
            _context.SupplementaryDividends.Add(sD);
            _context.SaveChanges();

            //initialize sessions
            Session["FromCSN"]        = null;
            Session["ToCSN"]          = null;
            Session["ISIN"]           = null;
            Session["TransferAmount"] = null;

            //email client


            ViewBag.IsView = "Acknowledgement";

            return(View());
        }
예제 #2
0
        public ActionResult Add(SupplementaryDividend sD)
        {
            Session["FromCSN"]        = sD.FromCSN;
            Session["ToCSN"]          = sD.ToCSN;
            Session["ToCSN"]          = sD.ToCSN;
            Session["ISIN"]           = sD.ISIN;
            Session["TransferAmount"] = sD.TransferAmount;

            return(Redirect("details"));
        }