Exemple #1
0
        public ActionResult Detail(int id)
        {
            var vm       = new DrawingsViewModel();
            var chariUow = _uow.GetUow <IChariUow, ChariUow>();

            vm.Detail = chariUow.GetDrawDetail(id);
            if (vm.Detail.Source == (int)Ichari.Model.Enum.GameSource.ChangeOfCare)
            {
                vm.UnionOrder = chariUow.LoveChangeService.Get(t => t.UnionOrder == vm.Detail.OrderNo);
            }
            else if (vm.Detail.Source == (int)Ichari.Model.Enum.GameSource.IchariDonation)
            {
                vm.ChariOrder = chariUow.OrderService.Get(t => t.TradeNo == vm.Detail.OrderNo);
            }
            return(View(vm));
        }
Exemple #2
0
        public ActionResult Index(int? source,int? pageIndex,string orderNo,bool? isWin)
        {
            if (Request.HttpMethod == "POST")
                pageIndex = 1;
            source = source ?? (int)Ichari.Model.Enum.GameSource.ChangeOfCare;
            var dvm = new DrawingsViewModel();

            if (pageIndex.HasValue)
                dvm.PageIndex = pageIndex.Value;

            var dlist = _uow.GetDrawList(source.Value);
            if (!string.IsNullOrEmpty(orderNo))
                dlist = dlist.Where(t => t.OrderNo == orderNo);
            if (isWin.HasValue)
                dlist = dlist.Where(t => t.IsWin == isWin.Value);

            dvm.PageList = new Common.Helper.PageList<DrawListDto>(dlist.OrderByDescending(t => t.DrawTime), dvm.PageIndex, dvm.PageCount);
            //dvm.DrawingsList = new Common.Helper.PageList<Drawings>(dlist.OrderByDescending(t => t.CreateTime), dvm.PageIndex, dvm.PageCount);
            dvm.SubMenuList = GetSubMenuList();
            ViewData["isWin"] = isWin;
            ViewData["source"] = source;
            ViewData["orderNo"] = orderNo;
            return View(dvm);
        }
Exemple #3
0
 public ActionResult Detail(int id)
 {            
     var vm = new DrawingsViewModel();
     var chariUow = _uow.GetUow<IChariUow,ChariUow>();
     vm.Detail = chariUow.GetDrawDetail(id);
     if (vm.Detail.Source == (int)Ichari.Model.Enum.GameSource.ChangeOfCare) {
         vm.UnionOrder = chariUow.LoveChangeService.Get(t => t.UnionOrder == vm.Detail.OrderNo);
     }
     else if (vm.Detail.Source == (int)Ichari.Model.Enum.GameSource.IchariDonation) {
         vm.ChariOrder = chariUow.OrderService.Get(t => t.TradeNo == vm.Detail.OrderNo);
     }
     return View(vm);
 }