我有第3号申请,在会议上反对将我所需要的所有价值作为执行储存程序参数。
如果用户行动得到更新,则执行所储存的程序。
public ActionResult Index(string userAction)
{
if(Session["Mappings"] != null)
ViewData["Message"] = "Mapping web grid";
if (Session["PricingSecurities"] == null)
Session["PricingSecurities"] = objRepository.GetPricingSecurityID();
if (Session["Cusips"] == null)
Session["Cusips"] = objRepository.GetCUSIP();
SecurityMappingModel objModel = null;
mappings = (List<SecurityMappingModel>)Session["Mappings"];
objModel = new SecurityMappingModel();
if (userAction == "Update" )
{
//help me to fix this code
//foreach (var item in Session)
//{Session["Mappings"] //NEED FIX HERE
//}
// PLEASE HELP ME TO RETRIEVE SESSION VALUES
return RedirectToAction("Index");
}
return View(objModel);
}
HOW CAN I RETRIEVE ALLVALUES OF Session [“Mappings”] it is held 3entries 3ids,3cusips,3calculation