예제 #1
0
        public ActionResult CpyPackageEdit(int id)
        {
            // 除了卡号不能修改,其他的都可以改,提交之后,该重新审核的就重新审核,不用审核的直接过,按照原有的规则来。
            var currentCpy = GetCurrentUser();

            ViewData.Model = PackageBll.CpyPackageDetails(id, currentCpy)
                             .Select(p => new Package_Card()
            {
                GiftType   = p.GiftType,
                EndDate    = p.EndDate,
                StartDate  = p.StartDate,
                State      = p.State,
                GameName   = p.GameName,
                GiftName   = p.GiftName,
                ServerName = p.ServerName,
                CompanyId  = p.CompanyId,
                Id         = p.Id,
                Url        = p.Url,
                Memo       = p.Memo,
                Msg        = p.Msg,
                Card       = p.Card
            }).FirstOrDefault();
            List <Package_Card> list = PackageBll.CpyPackageDetails(id, currentCpy)
                                       .Select(p => new Package_Card()
            {
                GiftType   = p.GiftType,
                EndDate    = p.EndDate,
                StartDate  = p.StartDate,
                State      = p.State,
                GameName   = p.GameName,
                GiftName   = p.GiftName,
                ServerName = p.ServerName,
                CompanyId  = p.CompanyId,
                Id         = p.Id,
                Url        = p.Url,
                Memo       = p.Memo,
                Msg        = p.Msg,
                Card       = p.Card
            }).ToList();

            ViewData["currentAllCode"] = list;
            ViewBag.allCountCode       = list.Count();
            return(View());
        }
예제 #2
0
        public ActionResult SeeCpyPackageDetail(int id)
        {
            // 礼包表和礼包卡号表连接查询、并且礼包不仅对应自己的id,也要对应当前厂商的id
            var currentCpy = GetCurrentUser();

            ViewData.Model = PackageBll.CpyPackageDetails(id, currentCpy)
                             .Select(p => new Package_Card()
            {
                GiftType   = p.GiftType,
                EndDate    = p.EndDate,
                StartDate  = p.StartDate,
                State      = p.State,
                GameName   = p.GameName,
                GiftName   = p.GiftName,
                ServerName = p.ServerName,
                CompanyId  = p.CompanyId,
                Id         = p.Id,
                Url        = p.Url,
                Memo       = p.Memo,
                Msg        = p.Msg,
                Card       = p.Card
            }).FirstOrDefault();
            List <Package_Card> list = PackageBll.CpyPackageDetails(id, currentCpy)
                                       .Select(p => new Package_Card()
            {
                GiftType   = p.GiftType,
                EndDate    = p.EndDate,
                StartDate  = p.StartDate,
                State      = p.State,
                GameName   = p.GameName,
                GiftName   = p.GiftName,
                ServerName = p.ServerName,
                CompanyId  = p.CompanyId,
                Id         = p.Id,
                Url        = p.Url,
                Memo       = p.Memo,
                Msg        = p.Msg,
                Card       = p.Card
            }).ToList();

            ViewData["currentAllCode"] = list;
            ViewBag.allCountCode       = list.Count();
            return(View());
        }