public ActionResult Index()
        {
            string UserName = Request.RequestContext.HttpContext.User.Identity.Name;
            var UserDetails = _aspNetUserService.GetAspNetUserByUserName(UserName);
            long id = UserDetails.AspNetUsersAdditionalInfoes.FirstOrDefault().ID;

            var aucHouseDetail = _auctionHouseService.GetAuctionByAuctionID(id);
            long aucid = aucHouseDetail.AuctionHouseID;

            var aucHouseSaleDetails = _auctionHouseSaleService.GetAuctionHouseSale().Where(t => t.AuctionHouseID == aucid && t.SaleDate<DateTime.UtcNow).ToList();

            AuctionHouseModel model = new AuctionHouseModel();
            if (aucHouseSaleDetails != null)
            {
                model.AuctionHouseSaleList = aucHouseSaleDetails;
            }

            return View(model);
        }
예제 #2
0
        public ActionResult SendToAuction()
        {
            List<AuctionHouse> aucHouseLi = _auctionHouseService.GetAllAuctionDetails().ToList();
            List<AuctionHouseModel> objlist = new List<AuctionHouseModel>();
            if (aucHouseLi.Count > 0)
            {
                foreach (var item in aucHouseLi)
                {
                    AuctionHouseModel model = new AuctionHouseModel();
                    model.AuctionHouseName = item.AuctionHouseName;
                    model.AuctionHouseID = item.AuctionHouseID;

                    objlist.Add(model);
                }
                return Json(objlist, JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json(objlist, JsonRequestBehavior.AllowGet);

            }
        }
예제 #3
0
        public ActionResult FindAuctionSale(long id)
        {
            List<AuctionHouseSale> aucHouseSaleLi = _auctionHouseSaleService.GetAuctionHouseSale().Where(t => t.AuctionHouseID == id && t.SaleDate > DateTime.UtcNow).ToList();
            AuctionHouseModel obj = new AuctionHouseModel();

            List<AuctionHouseModelSaleDate> list = new List<AuctionHouseModelSaleDate>();
            if (aucHouseSaleLi.Count > 0)
            {
                obj.AuctionHouseSaleList = aucHouseSaleLi;
                if (aucHouseSaleLi != null)
                {
                    foreach (var item in obj.AuctionHouseSaleList)
                    {
                        AuctionHouseModelSaleDate objsale = new AuctionHouseModelSaleDate();
                        objsale.AuctionHouseSaleID = item.AuctionHouseSaleID;
                        objsale.SaleDate = Convert.ToDateTime(item.SaleDate).ToString("dd/MM/yyyy");
                        list.Add(objsale);
                    }
                }
                //obj.AuctionHouseSaleList = aucHouseSaleLi;
                return Json(list, JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json(list, JsonRequestBehavior.AllowGet);

            }
        }