Exemple #1
0
        private bool ChangeTeller(Ticket ticket, CreateEditTicketViewModel data, PrevValue prevInput)
        {
            ////reflection
            //ticket.GetType().GetProperties();

            if (prevInput == PrevValue.Title)
            {
                return(ticket.Title != data.Title);
            }
            else if (prevInput == PrevValue.Description)
            {
                return(ticket.Description != data.Description);
            }
            else if (prevInput == PrevValue.ProjectId)
            {
                return(ticket.ProjectId != Convert.ToInt32(data.GetProjectBelong));
            }
            else if (prevInput == PrevValue.TicketPriorityId)
            {
                return(ticket.TicketPriorityId != Convert.ToInt32(data.GetTicketPriority));
            }
            else if (prevInput == PrevValue.TicketTypeId)
            {
                return(ticket.TicketTypeId != Convert.ToInt32(data.GetTicketType));
            }
            else if (prevInput == PrevValue.TicketStatusId)
            {
                return(ticket.TicketStatusId != Convert.ToInt32(data.GetTicketStatus));
            }

            return(false);
        }
 public override void ToStream(Stream output)
 {
     output.Write(TLUtils.SignatureToBytes(Signature));
     PrevValue.ToStream(output);
     NewValue.ToStream(output);
 }
Exemple #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasID)
            {
                hash ^= ID.GetHashCode();
            }
            if (HasMethod)
            {
                hash ^= Method.GetHashCode();
            }
            if (HasPath)
            {
                hash ^= Path.GetHashCode();
            }
            if (HasVal)
            {
                hash ^= Val.GetHashCode();
            }
            if (HasDir)
            {
                hash ^= Dir.GetHashCode();
            }
            if (HasPrevValue)
            {
                hash ^= PrevValue.GetHashCode();
            }
            if (HasPrevIndex)
            {
                hash ^= PrevIndex.GetHashCode();
            }
            if (HasPrevExist)
            {
                hash ^= PrevExist.GetHashCode();
            }
            if (HasExpiration)
            {
                hash ^= Expiration.GetHashCode();
            }
            if (HasWait)
            {
                hash ^= Wait.GetHashCode();
            }
            if (HasSince)
            {
                hash ^= Since.GetHashCode();
            }
            if (HasRecursive)
            {
                hash ^= Recursive.GetHashCode();
            }
            if (HasSorted)
            {
                hash ^= Sorted.GetHashCode();
            }
            if (HasQuorum)
            {
                hash ^= Quorum.GetHashCode();
            }
            if (HasTime)
            {
                hash ^= Time.GetHashCode();
            }
            if (HasStream)
            {
                hash ^= Stream.GetHashCode();
            }
            if (HasRefresh)
            {
                hash ^= Refresh.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }