コード例 #1
0
        public ActionResult Detay(int id)
        {
            var kullaniciId  = new ArizaRepo().GetById(id).UserID;
            var teknisyenler = TeknisyenSelectList();

            ViewBag.Teknisyenler = teknisyenler;
            var model = new ArizaDetayViewModel
            {
                Ariza        = new ArizaRepo().GetById((int)id),
                DurumListesi = new ArizaDurumRepo().GetAll().Where(x => x.ArizaID == id).ToList(),
                User         = MembershipTools.NewUserManager().Users.FirstOrDefault(x => x.Id == kullaniciId)
            };

            return(View(model));
        }
コード例 #2
0
        public ActionResult ArizaDetay(int id)
        {
            var    arizaRepo   = new ArizaRepo();
            var    userManager = MembershipTools.NewUserManager();
            string userId      = arizaRepo.GetById(id).UserID;
            string operatorId  = arizaRepo.GetById(id).OperatorID;
            string teknisyenId = arizaRepo.GetById(id).TeknisyenID;


            var model = new ArizaDetayViewModel
            {
                FotografList = new FotografRepo().GetAll().Where(x => x.ArızaID == id).ToList(),
                Ariza        = new ArizaRepo().GetById(id),
                DurumListesi = new ArizaDurumRepo().GetAll().Where(x => x.ArizaID == id).ToList(),
                Operator     = userManager.Users.FirstOrDefault(x => x.Id == operatorId),
                Teknisyen    = userManager.Users.FirstOrDefault(x => x.Id == teknisyenId),
                User         = userManager.Users.FirstOrDefault(x => x.Id == userId)
            };

            return(View(model));
        }