Exemplo n.º 1
0
        /// <summary>
        ///  Retrieving Contact from CRM
        /// </summary>
        /// <param name="contactId"> the Contact id. </param>
        /// <returns> VTigerContact entity </returns>
        public VTigerContact ReadContact(string contactId)
        {
            VTigerContact contact = new VTigerContact();
            try
            {
                contact = this.vTigerService.Retrieve<VTigerContact>(contactId);
            }
            catch (Exception ex)
            {
                this.LoggerService.LogException("Retrieving Contact :- " + ex.Message);
            }

            return contact;
        }
Exemplo n.º 2
0
        /// <summary>
        ///  Adding Contact into CRM
        /// </summary>
        /// <param name="contact"> the Contact entity. </param>
        /// <returns> VTigerContact entity </returns>
        public VTigerContact CreateContact(VTigerContact contact)
        {
            try
            {
                contact = this.vTigerService.Create<VTigerContact>(contact);
            }
            catch (Exception ex)
            {
                this.LoggerService.LogException("Adding Contact :- " + ex.Message);
                contact = new VTigerContact();
            }

            return contact;
        }
Exemplo n.º 3
0
        /// <summary>
        ///  Updating Contact in CRM
        /// </summary>
        /// <param name="contact">the Contact entity. </param>
        /// <returns> VTigerContact entity </returns>
        public VTigerContact UpdateContact(VTigerContact contact)
        {
            try
            {
                contact = this.vTigerService.Update<VTigerContact>(contact);
            }
            catch (Exception ex)
            {
                this.LoggerService.LogException("Updating Contact :- " + ex.Message);
                return null;
            }

            return contact;
        }