public ActionResult GetAllStockMaster() { StockMasterDal stockMasterDal = new StockMasterDal(); List <StockMasterDto> lstStockMasterDto = stockMasterDal.GetAndEditStockMaster(0, 1); return(Json(lstStockMasterDto, JsonRequestBehavior.AllowGet)); }
public ActionResult DeleteStockMaster(int StockId) { StockMasterDal stockMasterDal = new StockMasterDal(); int i = stockMasterDal.DeleteStockMaster(StockId); return(Json(i, JsonRequestBehavior.AllowGet)); }
public ActionResult SaveStockMaster(StockMasterDto stockMasterDto) { StockMasterDal stockMasterDal = new StockMasterDal(); stockMasterDto.CreatedBy = Convert.ToInt32(Session["AdminId"]); stockMasterDto.ModifiedBy = Convert.ToInt32(Session["AdminId"]); stockMasterDto.IsActive = 1; int i = stockMasterDal.SaveStockMaster(stockMasterDto); return(Json(i, JsonRequestBehavior.AllowGet)); }
public ActionResult UserOrders(int?page) { int pageSize = 5; int pageIndex = 1; pageIndex = page.HasValue ? Convert.ToInt32(page) : 1; IPagedList <UserOrderDetailsDto> UserOrderDetailsDto = null; ViewBag.AdminDetails = TempData["AdminDetails"]; TempData.Keep(); UserSignUpDal userSignUpDal = new UserSignUpDal(); StockMasterDal stockMasterDal = new StockMasterDal(); UserOrderDetailsDal userOrderDetailsDal = new UserOrderDetailsDal(); List <UserOrderDetailsDto> userOrderDetailsDtos = userOrderDetailsDal.GetAllOrderTable(); ViewBag.AllOrders = userOrderDetailsDtos; UserOrderDetailsDto = userOrderDetailsDtos.ToPagedList(pageIndex, pageSize); return(View(UserOrderDetailsDto)); }
public ActionResult DashBoard(int?page) { int pageSize = 5; int pageIndex = 1; pageIndex = page.HasValue ? Convert.ToInt32(page) : 1; IPagedList <UserOrderDetailsDto> UserOrderDetailsDto = null; ViewBag.AdminDetails = TempData["AdminDetails"]; TempData.Keep(); UserSignUpDal userSignUpDal = new UserSignUpDal(); StockMasterDal stockMasterDal = new StockMasterDal(); UserOrderDetailsDal userOrderDetailsDal = new UserOrderDetailsDal(); List <UserSignUpDto> lstUserSignUpDto = userSignUpDal.GetAllUserList(); List <StockMasterDto> lstStockMasterDto = stockMasterDal.GetAndEditStockMaster(0, 1); List <UserOrderDetailsDto> lstUserOrderDetailsDtos = userOrderDetailsDal.GetAllOrderTable(); ViewBag.UserCount = lstUserSignUpDto.Count(); ViewBag.StockCount = lstStockMasterDto.Count; ViewBag.AllOrders = lstUserOrderDetailsDtos; ViewBag.AllOrdersCount = lstUserOrderDetailsDtos.Count(); UserOrderDetailsDto = lstUserOrderDetailsDtos.ToPagedList(pageIndex, pageSize); return(View(UserOrderDetailsDto)); }