public ActionResult index(int id)
{
if (Session["std"] != null)
{
var c = db.Courses.Find(id);
var s = (Student)Session["std"];
//if (db.Orders.Where(x => x.Student_fid == s.Student_id && x.OrderDetails.FirstOrDefault().course_fid == c.Course_id).Any())
//{
// return RedirectToAction("blogdetails", "Home", new { id = c.Course_id });
//}
//else
//{
Session["checkoutcourseid"] = id;
return View();
//}
}
else
{
//TempData["errormsg"] = " <script> alert(' Please Loging/Signup first. ') </script>";
return RedirectToAction("register", "Home");
}
}