Exemplo n.º 1
0
        private RanksTicketsClassesViewModel GetByRankTicketClassID(int id)
        {
            RanksTicketsClassesBLL       RanksTicketsClassesBLL = (new RanksTicketsClassesBLL()).GetByRankTicketClassID(id);
            RanksTicketsClassesViewModel RankTicketClassVM      = new RanksTicketsClassesViewModel();

            if (RanksTicketsClassesBLL != null)
            {
                RankTicketClassVM.RankTicketClassID = RanksTicketsClassesBLL.RankTicketClassID;
                RankTicketClassVM.Rank        = RanksTicketsClassesBLL.Rank;
                RankTicketClassVM.TicketClass = RanksTicketsClassesBLL.TicketClass;
            }
            return(RankTicketClassVM);
        }
Exemplo n.º 2
0
        public ActionResult Create(RanksTicketsClassesViewModel RankTicketClassVM)
        {
            RanksTicketsClassesBLL RankTicketClass = new RanksTicketsClassesBLL();

            RankTicketClass.Rank        = RankTicketClassVM.Rank;
            RankTicketClass.TicketClass = RankTicketClassVM.TicketClass;
            Result result = RankTicketClass.Add();

            if ((System.Type)result.EnumType == typeof(LookupsValidationEnum))
            {
                RanksTicketsClassesBLL RankTicketClassEntity = (RanksTicketsClassesBLL)result.Entity;
                if (result.EnumMember == LookupsValidationEnum.Done.ToString())
                {
                    Session["RankTicketClassID"] = ((RanksTicketsClassesBLL)result.Entity).RankTicketClassID;
                }
            }

            return(View(RankTicketClassVM));
        }
Exemplo n.º 3
0
 public ActionResult Delete(RanksTicketsClassesViewModel RankTicketClassVM)
 {
     RanksTicketsClassesBLL.Remove(RankTicketClassVM.RankTicketClassID);
     return(RedirectToAction("Index"));
 }