Exemple #1
0
        /// <summary>
        ///     Update an existing contact. To delete a contact person remove it from the contact_persons list.
        /// </summary>
        /// <param name="contact_id">The contact_id is the identifier of the contact.</param>
        /// <param name="update_info">The update_info is the Contact object which contains the update information.</param>
        /// <returns>Contact object.</returns>
        public Contact Update(string contact_id, Contact update_info)
        {
            var url        = baseAddress + "/" + contact_id;
            var json       = JsonConvert.SerializeObject(update_info);
            var jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.put(url, getQueryParameters(jsonstring));

            return(ContactParser.getContact(responce));
        }
Exemple #2
0
        /// <summary>
        ///     Creates a contact with given information.
        /// </summary>
        /// <param name="new_contact_info">
        ///     The new_contact_info is the Contact object which provides the information to create a
        ///     contact with contact_name as mandatory parameters.
        /// </param>
        /// <returns>Contact object.</returns>
        public Contact Create(Contact new_contact_info)
        {
            var url        = baseAddress;
            var json       = JsonConvert.SerializeObject(new_contact_info);
            var jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring));

            return(ContactParser.getContact(responce));
        }
Exemple #3
0
        /// <summary>
        /// Sends email to contact.
        /// </summary>
        /// <param name="contact_id">The contact_id is the identifier of the contact.</param>
        /// <param name="email_content">The email_content.</param>
        /// <param name="parameters">The parameters contains the query string in the form of key-value pair.<br></br>The possible key as mentioned below: <br></br>br>send_customer_statement - Send customer statement pdf with email. <br></br></param>
        /// <param name="attachment_paths">The attachment_paths are the attached files information.</param>
        /// <returns>System.String.<br></br>The success message is "Email has been sent."</returns>
        public string SendEmailContact(string contact_id, EmailNotification email_content, Dictionary <object, object> parameters, string[] attachment_paths)
        {
            string url        = baseAddress + "/" + contact_id + "/email";
            var    json       = JsonConvert.SerializeObject(email_content);
            var    jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var files    = new KeyValuePair <string, string[]>("attachments", attachment_paths);
            var responce = ZohoHttpClient.post(url, getQueryParameters(), jsonstring, files);

            return(ContactParser.getMessage(responce));
        }
Exemple #4
0
        protected override void Initialize()
        {
            base.Initialize();

            App.Instance = this;
            //Initialize the game model
            gameModel = new GameModel();
            //Initialize AudioEngine
            towerAudioEngine = new TowerAudioEngine(gameModel);
            //Initialize the UI component
            gameView      = new SimpleView(gameModel, graphics, Content);
            contactParser = new ContactParser();
        }
Exemple #5
0
        public TestingApp()
        {
            App.Instance = this;

            PresentationParameters pp = new PresentationParameters();

            graphics = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, DeviceType.NullReference, System.IntPtr.Zero, pp);

            model = new GameModel();
            model.Music.TimeSignature = new TimeSignature(4, 4);
            model.Music.Tempo         = 60;
            model.Music.ClicksPerBeat = 4;

            controller = new ContactParser();
        }
        private ContactHeader Parse(string text)
        {
            var parser = new ContactParser();

            return((ContactHeader)parser.Parse("From", new StringReader(text)));
        }