예제 #1
0
        public static TicketsSearchCondition Create(int createdByUserId)
        {
            TicketsSearchCondition TicketSC = new TicketsSearchCondition();

            TicketSC.KeyWord        = string.Empty;
            TicketSC.Status         = string.Empty;
            TicketSC.Type           = Enum.GetName(typeof(TicketsType), TicketsType.Bug);;
            TicketSC.Project        = string.Empty;
            TicketSC.AssignedUser   = createdByUserId.ToString();
            TicketSC.Company        = string.Empty;
            TicketSC.Client         = string.Empty;
            TicketSC.ClientPriority = Enum.GetName(typeof(PriorityState), PriorityState.Normal);
            TicketSC.PriorityView   = true;
            return(TicketSC);
        }
        public TicketsSearchCondition ToBusinessEntity()
        {
            TicketsSearchCondition TicketInfo = TicketsSerachConditionFactory.Create(this.requestByUserId);

            TicketInfo.KeyWord             = TicketSc.KeyWord;
            TicketInfo.Status              = TicketSc.Status;
            TicketInfo.Type                = TicketSc.TicketType;
            TicketInfo.Project             = TicketSc.Project;
            TicketInfo.ProjectID           = TicketSc.projectId;
            TicketInfo.AssignedUser        = TicketSc.AssignedUser;
            TicketInfo.Company             = TicketSc.Company;
            TicketInfo.Client              = TicketSc.Client;
            TicketInfo.ClientPriority      = TicketSc.ClientPriority;
            TicketInfo.IsInternal          = TicketSc.IsInternal;
            TicketInfo.OrderDirection      = TicketSc.OrderDirection;
            TicketInfo.OrderExpression     = TicketSc.OrderExpression;
            TicketInfo.FeedBackTicketsList = TicketSc.FeedBackTicketsList;
            if (requestByUserId != 0)
            {
                TicketInfo.AssignedUser = requestByUserId.ToString();
            }
            return(TicketInfo);
        }