Esempio n. 1
0
        private ZCRMEventParticipant GetZCRMParticipant(JObject participantDetails)
        {
            long   Id   = Convert.ToInt64(participantDetails["id"]);
            string type = (string)participantDetails["type"];
            ZCRMEventParticipant participant = ZCRMEventParticipant.GetInstance(type, Id);

            participant.Name        = (string)participantDetails["name"];
            participant.Email       = (string)participantDetails["Email"];
            participant.IsInvited   = (bool)participantDetails["invited"];
            participant.Status      = (string)participantDetails["status"];
            participant.Participant = (string)participantDetails["participant"];
            return(participant);
        }
Esempio n. 2
0
        //TODO: Handle exceptions;
        private JObject GetZCRMParticipantsAsJSON(ZCRMEventParticipant participant)
        {
            JObject participantJSON = new JObject();

            participantJSON.Add("participant", participant.Id.ToString());
            participantJSON.Add("type", participant.Type);
            participantJSON.Add("name", participant.Name);
            participantJSON.Add("Email", participant.Email);
            participantJSON.Add("invited", participant.IsInvited);
            participantJSON.Add("status", participant.Status);

            return(participantJSON);
        }
Esempio n. 3
0
        private JObject GetZCRMParticipantsAsJSON(ZCRMEventParticipant participant)
        {
            JObject participantJSON = new JObject
            {
                { "participant", participant.Id == 0?participant.Participant:participant.Id.ToString() },
                { "type", participant.Type },
                { "name", participant.Name },
                { "Email", participant.Email },
                { "invited", participant.IsInvited },
                { "status", participant.Status }
            };

            return(participantJSON);
        }
Esempio n. 4
0
        private ZCRMEventParticipant GetZCRMParticipant(JObject participantDetails)
        {
            long   participantId = Convert.ToInt64(participantDetails.GetValue("participant"));
            string type          = Convert.ToString(participantDetails.GetValue("type"));

            ZCRMEventParticipant participant = ZCRMEventParticipant.GetInstance(type, participantId);

            participant.Name      = Convert.ToString(participantDetails.GetValue("name"));
            participant.Email     = Convert.ToString(participantDetails.GetValue("Email"));
            participant.IsInvited = Convert.ToBoolean(participantDetails.GetValue("invited"));
            participant.Status    = Convert.ToString(participantDetails.GetValue("status"));

            return(participant);
        }
Esempio n. 5
0
        private ZCRMEventParticipant GetZCRMParticipant(JObject participantDetails)
        {
            object participantId = participantDetails["participant"];
            string type          = (string)participantDetails["type"];

            ZCRMEventParticipant participant = null;

            if (type != "email")
            {
                participant           = ZCRMEventParticipant.GetInstance(type, Convert.ToInt64(participantId));
                participant.Name      = (string)participantDetails["name"];
                participant.Email     = (string)participantDetails["Email"];
                participant.IsInvited = (bool)participantDetails["invited"];
                participant.Status    = (string)participantDetails["status"];
            }
            else
            {
                participant           = ZCRMEventParticipant.GetInstance(type, 0L);
                participant.Name      = (string)participantDetails["name"];
                participant.IsInvited = (bool)participantDetails["invited"];
                participant.Status    = (string)participantDetails["status"];
            }
            return(participant);
        }