Example #1
0
 /// <summary>
 /// To update the record.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 public APIResponse Update(List <string> trigger = null, List <string> process = null)
 {
     if (EntityId == null)
     {
         throw new ZCRMException("Entity ID MUST NOT be NULl for update operation");
     }
     return(EntityAPIHandler.GetInstance(this).UpdateRecord(trigger, process));
 }
Example #2
0
 /// <summary>
 /// To create the record.
 /// </summary>
 /// <returns>APIResponse class instance</returns>
 public APIResponse Create(List <string> trigger = null, string lar_id = null, List <string> process = null)
 {
     if (EntityId != null)
     {
         throw new ZCRMException("Entity ID MUST be NUL for Create Operation");
     }
     return(EntityAPIHandler.GetInstance(this).CreateRecord(trigger, lar_id, process));
 }
Example #3
0
 /// <summary>
 /// To delete the record.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 public APIResponse Delete()
 {
     if (EntityId == null)
     {
         throw new ZCRMException("Entity ID MUST NOT be NULL for Delete Operation");
     }
     return(EntityAPIHandler.GetInstance(this).DeleteRecord());
 }
Example #4
0
 /// <summary>
 /// To update the record.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 public APIResponse Update()
 {
     if (EntityId == null)
     {
         throw new ZCRMException("Entity ID MUST NOT be NULl for update operation");
     }
     return(EntityAPIHandler.GetInstance(this).UpdateRecord());
 }
Example #5
0
 /// <summary>
 /// To create the record.
 /// </summary>
 /// <returns>APIResponse class instance</returns>
 public APIResponse Create()
 {
     if (EntityId != null)
     {
         throw new ZCRMException("Entity ID MUST be NUL for Create Operation");
     }
     return(EntityAPIHandler.GetInstance(this).CreateRecord());
 }
Example #6
0
        /// <summary>
        /// To get the record based on record Id of the module.
        /// </summary>
        /// <returns>APIResponse class instance.</returns>
        /// <param name="entityId">Entity(record) Id (Long) of the module</param>
        public APIResponse GetRecord(long entityId)
        {
            ZCRMRecord record = ZCRMRecord.GetInstance(ApiName, entityId);

            return(EntityAPIHandler.GetInstance(record).GetRecord());
        }
Example #7
0
 /// <summary>
 /// To deletes the record photo.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 public APIResponse DeletePhoto()
 {
     return(EntityAPIHandler.GetInstance(this).DeletePhoto());
 }
Example #8
0
 /// <summary>
 /// To download the record photo.
 /// </summary>
 /// <returns>FileAPIResponse class instance.</returns>
 public FileAPIResponse DownloadPhoto()
 {
     return(EntityAPIHandler.GetInstance(this).DownloadPhoto());
 }
Example #9
0
 /// <summary>
 /// To upload the record photo based on file path
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="filePath">Upload photo file path (String)</param>
 public APIResponse UploadPhoto(string filePath)
 {
     return(EntityAPIHandler.GetInstance(this).UploadPhoto(filePath));
 }
Example #10
0
 /// <summary>
 /// To convert the record based on potential record  and ZCRMUser class instance.
 /// </summary>
 /// <returns>Dictionary(String,Long).</returns>
 /// <param name="potential">ZCRMRecord class instance</param>
 /// <param name="assignToUser">ZCRMUser class instance</param>
 public Dictionary <string, long> Convert(ZCRMRecord potential, ZCRMUser assignToUser)
 {
     return(EntityAPIHandler.GetInstance(this).ConvertRecord(potential, assignToUser));
 }