Пример #1
0
        public override bool FullEquals(RequestEntity other)
        {
            if (other == null)
            {
                return(false);
            }

            if (object.ReferenceEquals(this, other))
            {
                return(true);
            }

            return(string.Equals(Id, other.Id) &&
                   ReqDateTime == other.ReqDateTime &&
                   string.Equals(Subject, other.Subject) &&
                   (Comments ?? "") == (other.Comments ?? "") &&
                   string.Equals(Contact, other.Contact) &&
                   Application.Equals(other.Application) &&
                   Organization.Equals(other.Organization) &&
                   ResponseUser.Equals(other.ResponseUser) &&
                   CreatorUser.Equals(other.CreatorUser) &&
                   InfoSourceType == other.InfoSourceType &&
                   State == other.State &&
                   (BugNumber ?? "") == (other.BugNumber ?? "") &&
                   string.Equals(CMVersion, other.CMVersion) &&
                   string.Equals(ComponentVersion, other.ComponentVersion) &&
                   IsImportant == other.IsImportant);
        }
Пример #2
0
 public async Task <IEnumerable <ChatBot> > GetForUser(CreatorUser creator)
 {
     return(await _context.Bots
            .Include(x => x.Author)
            .Include(x => x.Questions)
            .Where(x => x.Author.Id == creator.Id)
            .ToListAsync());
 }
Пример #3
0
        public override RequestListFilterEntity Clone()
        {
            RequestListFilterEntity result = new RequestListFilterEntity();

            result.Id            = Id;
            result.CloneKey      = CloneKey.Clone();
            result.FilterName    = FilterName;
            result.StartDateTime = StartDateTime;
            result.StopDateTime  = StopDateTime;
            result.Organization  = Organization.Clone();
            result.ResponseUser  = ResponseUser.Clone();
            result.CreatorUser   = CreatorUser.Clone();
            result.Application   = Application.Clone();
            result.StatusIdList  = StatusIdList;
            result.TagIdList     = TagIdList;
            result.Subject       = Subject;
            result.Contact       = Contact;
            result.Comments      = Comments;
            result.RequestId     = RequestId;
            return(result);
        }
Пример #4
0
        public ChatBot ToBot(CreatorUser creator)
        {
            // Initialize questions
            List <Question> questions = new List <Question>();

            foreach (var q in Questions)
            {
                questions.Add(new Question {
                    Text = q.Question, Value = q.SerializedValue()
                });
            }

            var rng = new Random();
            var url = rng.Next().ToString("x8"); // Will generate hex strings 8 chars in length

            // Make the bot
            return(new ChatBot {
                Name = Name,
                AuthorId = creator.Id,
                Questions = questions,
                Url = url
            });
        }
Пример #5
0
 private void CreateUser()
 {
     _feedback = CreatorUser.Create(userIdTbx.Text, newLastNameTbx.Text, newFirstNameTbx.Text, newMidNameTbx.Text, newUserPassTbx.Text, _typeNewUser);
 }