public ActionResult AddInventoryDetails(InventoryDetailsModel objDetails) { if (Session["InventoryID"] != null) { objDetails.InventoryID = Convert.ToInt32(Session["InventoryID"].ToString()); } Session["InventoryID"] = null; return(Json(objDAL.AddInventoryDetails(objDetails))); }