// GET: TenderManage
        public ActionResult BidGather(int id)
        {
            var data_BidManage = BLLContainer.Resolve <IData_BidManageService>().GetModels(p => p.ID == id).FirstOrDefault();

            ViewBag.data_BidManage = data_BidManage;
            ViewBag.productName    = ProductTypeBusiness.GetProductName(ViewBag.data_BidManage.ProductType);

            var userInfoCacheModel = Session["loginUser"] as UserInfoCacheModel;

            ViewBag.userId = userInfoCacheModel.ID;
            int productType = (int)userInfoCacheModel.ProductType;
            int userLvl     = (int)userInfoCacheModel.UserLvl;

            ViewBag.MaxAmount = getMaxAmount((decimal)data_BidManage.EstimateAmount, productType, userLvl);

            ViewBag.flw_BiddingInfoList = getFlw_BiddingInfoList(id);

            var flw_BiddingInfo = new Flw_BiddingInfo();

            flw_BiddingInfo.BidID = id;

            double timeleft = 0;

            getTimeLeft(data_BidManage, id, out timeleft);
            ViewBag.timeleft = (timeleft <= 0) ? 0 : timeleft;
            return(View(flw_BiddingInfo));
        }
        public PartialViewResult BidDetail(int bidId)
        {
            IData_BidManageService data_BidManageService = BLLContainer.Resolve <IData_BidManageService>();
            var data_BidManage = data_BidManageService.GetModels(p => p.ID == bidId).FirstOrDefault();

            ViewBag.productName         = ProductTypeBusiness.GetProductName(data_BidManage.ProductType);
            ViewBag.bidDate             = string.Format("{0:yyyy-M-d}", data_BidManage.BidDate);
            ViewBag.flw_BiddingInfoList = getFinalBiddingInfoList(bidId);

            return(PartialView());
        }
        public ActionResult BidVerify(int id)
        {
            IData_BidManageService data_BidManageService = BLLContainer.Resolve <IData_BidManageService>();
            var data_BidManage = data_BidManageService.GetModels(p => p.ID == id).FirstOrDefault();

            ViewBag.productName = ProductTypeBusiness.GetProductName(data_BidManage.ProductType);

            IFlw_BiddingInfoService flw_BiddingInfoService = BLLContainer.Resolve <IFlw_BiddingInfoService>();
            var flw_BiddingInfoList = flw_BiddingInfoService.GetModels(p => p.BidID == id).OrderByDescending(o => o.BidPrice).ThenByDescending(o => o.BidAmount).ThenBy(o => o.BidTime).ToList();

            return(View(flw_BiddingInfoList));
        }
        // GET: TenderManage
        public ActionResult BidView(int id)
        {
            IData_BidManageService data_BidManageService = BLLContainer.Resolve <IData_BidManageService>();
            var data_BidManage = data_BidManageService.GetModels(p => p.ID == id).FirstOrDefault();

            ViewBag.data_BidManage      = data_BidManage;
            ViewBag.productName         = ProductTypeBusiness.GetProductName(data_BidManage.ProductType);
            ViewBag.bidDate             = string.Format("{0:yyyy-M-d}", data_BidManage.BidDate);
            ViewBag.flw_BiddingInfoList = getFlw_BiddingInfoList(id);

            return(View());
        }