Ejemplo n.º 1
0
        //GET: User/Heklijo/MyTickets/TicketDetails/5
        public ActionResult TicketDetails(int id)
        {
            MyTicketViewModel model = DapperORM.getSingleTicketData(id);

            model.teams = DapperORM.getTeamData();
            return(View(model));
        }
Ejemplo n.º 2
0
        // GET: Tickets
        public ActionResult Index()
        {
            var myTicketVM = new MyTicketViewModel();

            myTicketVM.AllTickets = db.Tickets.ToList();
            myTicketVM.MyTickets  = ticketManager.GetMyTickets();
            return(View(myTicketVM));
        }
        public ActionResult assignTicketToTeam(int id)
        {
            MyTicketViewModel model = DapperORM.getSingleTicketData(id);

            model.teams = DapperORM.getTeamData();

            currentID = id;
            var assignment = new AssignmentViewModel
            {
                Ticket = model,
                teams  = DapperORM.getTeamData()
            };

            return(View(assignment));
        }
        // GET: MyTicket
        public ActionResult Index(int page = 1)
        {
            MyTicketViewModel viewModel = new MyTicketViewModel();

            using (var dbContext = unitOfWorkFactory.CreateUnitOfWork())
            {
                PagingInfo PagingInfo = new PagingInfo()
                {
                    CurrentPage  = page,
                    ItemsPerPage = PageSize
                };
                List <Ticket> tickets = myTicketModel.GetTicketsUser(dbContext, PagingInfo);
                viewModel.Tickets    = tickets;
                viewModel.PagingInfo = PagingInfo;
            }
            return(View(viewModel));
        }