Ejemplo n.º 1
0
        public string TranslateTicketState(TicketState ticketState)
        {
            switch (ticketState)
            {
            case TicketState.New:
                return(Resources.String_New);

            case TicketState.Accepted:
                return(Resources.String_Accepted);

            case TicketState.Closed:
                return(Resources.String_Closed);

            case TicketState.Completed:
                return(Resources.String_Completed);

            case TicketState.InProgress:
                return(Resources.String_InProgress);

            case TicketState.Blocked:
                return(Resources.String_Blocked);

            default:
                return(ticketState.ToString());
            }
        }
Ejemplo n.º 2
0
        public bool Edit(int id, string title, string description, TicketType ticketType, TicketState ticketState)
        {
            DATA_MODELS.Ticket ticket = this.db.Tickets.FirstOrDefault(t => t.Id == id);

            if (ticket == null)
            {
                return(false);
            }

            ticket.Title       = title;
            ticket.Description = description;
            ticket.TicketType  = (DATA_ENUMS.TicketType)Enum.Parse(typeof(DATA_ENUMS.TicketType), ticketType.ToString());
            ticket.TicketState = (DATA_ENUMS.TicketState)Enum.Parse(typeof(DATA_ENUMS.TicketState), ticketState.ToString());

            this.db.SaveChanges();

            return(true);
        }
Ejemplo n.º 3
0
        private string TranslateTicketState(TicketState ticketState)
        {
            switch (ticketState)
            {
                case TicketState.New:
                    return Resources.String_New;

                case TicketState.Accepted:
                    return Resources.String_Accepted;

                case TicketState.Closed:
                    return Resources.String_Closed;

                case TicketState.Completed:
                    return Resources.String_Completed;

                default:
                    return ticketState.ToString();
            }
        }