public ActionResult DeleteWishListItem(int wishListId) { //var wishListData = CustmorWishlistCRUD.GetWishlistByWishlistId(wishListId); try { var result = CustmorWishlistCRUD.DeleteWhishListItem(wishListId); if (result == true) { return(Json(result)); } else { return(RedirectToAction("Index", "Error")); } } catch (Exception ex) { ExceptionLogDomain obj = new ExceptionLogDomain(); obj.MethodName = "DeleteWishListItem"; obj.ControllerName = "WishList"; obj.ErrorText = ex.Message; obj.StackTrace = ex.StackTrace; obj.Datetime = DateTime.Now; ExceptionLogCRUD.AddToExceptionLog(obj); return(RedirectToAction("Index", "Error")); } }
public ActionResult TopSearchBar() { try { //"1" is customerid if (Session["idUser"] != null) { ViewBag.totalItemsInCart = CustomerCartCRUD.GetCartByCustomerId(Convert.ToInt32(Session["idUser"])).Where(x => x.IsPlace == false).Count(); ViewBag.totalItemsInWishList = CustmorWishlistCRUD.GetWishlistByCustomerId(Convert.ToInt32(Session["idUser"])).Count(); } else { ViewBag.totalItemsInCart = 0; ViewBag.totalItemsInWishList = 0; } return(PartialView("_TopSearchMenu")); } catch (Exception ex) { ExceptionLogDomain obj = new ExceptionLogDomain(); obj.MethodName = "TopSearchBar"; obj.ControllerName = "Menu"; obj.ErrorText = ex.Message; obj.StackTrace = ex.StackTrace; obj.Datetime = DateTime.Now; ExceptionLogCRUD.AddToExceptionLog(obj); return(RedirectToAction("Index", "Error")); } }
// GET: WishList public ActionResult Index() { try { if (Session["idUser"] != null) { var wishListData = CustmorWishlistCRUD.GetWishlistByCustomerId(Convert.ToInt32(Session["idUser"])); return(View(wishListData)); } else { return(RedirectToAction("Login", "Customer")); } } catch (Exception ex) { ExceptionLogDomain obj = new ExceptionLogDomain(); obj.MethodName = "Index"; obj.ControllerName = "WishList"; obj.ErrorText = ex.Message; obj.StackTrace = ex.StackTrace; obj.Datetime = DateTime.Now; ExceptionLogCRUD.AddToExceptionLog(obj); return(RedirectToAction("Index", "Error")); } }
public ActionResult CustomersWishlist() { int custid = Convert.ToInt32(Session["idUser"]); var data = CustmorWishlistCRUD.GetWishlistByCustomerId(custid); return(View(data)); }
public ActionResult AddToWishList(string prodId, string price) { try { if (Session["idUser"] != null) { CustomerWishlistDomain mCustomerWishlist = new CustomerWishlistDomain(); mCustomerWishlist.Amount = Convert.ToDecimal(price); mCustomerWishlist.CreatedDateTime = DateTime.Now; mCustomerWishlist.CustomerId = Convert.ToInt32(Session["idUser"]); mCustomerWishlist.ProductId = prodId; CustmorWishlistCRUD.AddToWishlist(mCustomerWishlist); return(Json(true)); } else { return(RedirectToAction("Login", "Customer")); } } catch (Exception ex) { ExceptionLogDomain obj = new ExceptionLogDomain(); obj.MethodName = "AddToWishList"; obj.ControllerName = "Product"; obj.ErrorText = ex.Message; obj.StackTrace = ex.StackTrace; obj.Datetime = DateTime.Now; ExceptionLogCRUD.AddToExceptionLog(obj); return(RedirectToAction("Index", "Error")); } }
// GET: Menu public ActionResult Index() { //"1" is customerid if (Session["idUser"] != null) { ViewBag.totalItemsInWishList = CustmorWishlistCRUD.GetWishlistByCustomerId(Convert.ToInt32(Session["idUser"])).Count(); } else { ViewBag.totalItemsInWishList = 0; } return(View()); }
public ActionResult Index() { ViewBag.BrandOnHomePage = BrandmasterCRUD.GetBrandMaster().Where(x => x.IsOnHomePage == true); if (Session["idUser"] != null) { ViewBag.totalItemsInCart = CustomerCartCRUD.GetCartByCustomerId(Convert.ToInt32(Session["idUser"])).Where(x => x.IsPlace == false).Count(); ViewBag.totalItemsInWishList = CustmorWishlistCRUD.GetWishlistByCustomerId(Convert.ToInt32(Session["idUser"])).Count(); } else { ViewBag.totalItemsInCart = 0; ViewBag.totalItemsInWishList = 0; } return(View()); }
public ActionResult GetMenuList() { try { var data = GRP_MASTERCRUD.GetAllMenu(); ViewBag.totalItemsInWishList = CustmorWishlistCRUD.GetWishlistByCustomerId(Convert.ToInt32(Session["idUser"])).Count(); return(PartialView("Menu", data)); } catch (Exception ex) { ExceptionLogDomain obj = new ExceptionLogDomain(); obj.MethodName = "GetMenuList"; obj.ControllerName = "Menu"; obj.ErrorText = ex.Message; obj.StackTrace = ex.StackTrace; obj.Datetime = DateTime.Now; ExceptionLogCRUD.AddToExceptionLog(obj); return(RedirectToAction("Index", "Error")); } }