Ejemplo n.º 1
0
 public void AddEntry(string accessKey, long siteId,
                      long contestId, long?userId, bool isEnabled, string cultureCode, string email, string firstName, string lastName,
                      string title, string description, long?fileId, string fileUrl,
                      string tel, string telType, string address, string city, string province,
                      string postalCode, string country)
 {
     try
     {
         SecureAddEntry(accessKey, siteId,
                        contestId, userId, isEnabled, cultureCode, email, firstName, lastName,
                        title, description, fileId, fileUrl,
                        tel, telType, address, city, province,
                        postalCode, country);
     }
     catch (System.Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="accessKey"></param>
 /// <param name="siteId"></param>
 /// <param name="emailOrUsername"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public AWAPI_Data.CustomEntities.UserExtended Login(string accessKey, long siteId, string emailOrUsername, string password)
 {
     try
     {
         return(SecureLogin(accessKey, siteId, emailOrUsername, password));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="accessKey"></param>
 /// <param name="siteId"></param>
 /// <param name="email"></param>
 public void ResetPassword(string accessKey, long siteId, string email, string redirectLink)
 {
     try
     {
         SecureResetPassword(accessKey, siteId, email, redirectLink);
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="userId"></param>
 /// <returns></returns>
 public AWAPI_Data.CustomEntities.UserExtended Get(string accessKey, long siteId, long userId)
 {
     try
     {
         return(SecureGet(accessKey, siteId, userId));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 5
0
 public System.Collections.Generic.IEnumerable <AWAPI_Data.CustomEntities.UserExtended> GetList(string accessKey, long siteId, string where, string sortField)
 {
     try
     {
         return(SecureGetList(accessKey, siteId, where, sortField));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="accessKey"></param>
 /// <param name="siteId"></param>
 /// <param name="postId"></param>
 /// <param name="userName"></param>
 /// <param name="email"></param>
 /// <param name="firstName"></param>
 /// <param name="lastName"></param>
 /// <param name="title"></param>
 /// <param name="description"></param>
 /// <returns></returns>
 public bool AddBlogComment(string accessKey, long siteId, long postId, string userName, string email, string firstName, string lastName, string title, string description)
 {
     try
     {
         return(SecureAddBlogComment(accessKey, siteId, postId, userName, email, firstName, lastName, title, description));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Adds a new file with URL address.
 /// The difference between Upload and Add is:
 ///     the Upload methods uploads a file to
 /// </summary>
 /// <param name="siteId"></param>
 /// <param name="userId"></param>
 /// <param name="title"></param>
 /// <param name="description"></param>
 /// <param name="fileFullPath"></param>
 /// <param name="fileContent"></param>
 /// <param name="status"></param>
 /// <returns></returns>
 public long Add(string accessKey, long siteId, long fileId, long[] groupIds, long userId, string title, string description, string fileUrl, string thumbUrl)
 {
     try
     {
         return(SecureAdd(accessKey, siteId, fileId, groupIds, userId, title, description, fileUrl, thumbUrl));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="fileId"></param>
 public void Delete(string accessKey, long siteId, long fileId)
 {
     try
     {
         SecureDelete(accessKey, siteId, fileId);
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="siteId"></param>
 /// <returns></returns>
 public System.Collections.Generic.IEnumerable <awFile> GetListByGroupId(string accessKey, long siteId, long groupId)
 {
     try
     {
         return(SecureGetListByGroupId(accessKey, siteId, groupId));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public AWAPI_Data.Data.awFile Get(string accessKey, long siteId, long id)
 {
     try
     {
         return(SecureGet(accessKey, siteId, id));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="fileId"></param>
 /// <param name="title"></param>
 /// <param name="description"></param>
 /// <param name="status"></param>
 /// <returns></returns>
 public void Update(string accessKey, long siteId, long fileId, long[] groupIds, string title, string description, string fileFullPath, string fileContent, string size)
 {
     try
     {
         SecureUpdate(accessKey, siteId, fileId, groupIds, title, description, fileFullPath, fileContent, size);
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 12
0
 public ContestExtended SecureGet(string accessKey, long siteId, long contestId)
 {
     try
     {
         ContestExtended contest = _contestLib.GetContest(contestId, true);
         return(contest);
     }
     catch (System.Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 13
0
 public System.Collections.Generic.IList <AWAPI_Data.CustomEntities.ContestEntryDailyReport> GetEntryDailySummary(string accessKey, long siteId,
                                                                                                                  long contestId, long?userId)
 {
     try
     {
         return(SecureGetEntryDailySummary(accessKey, siteId, contestId, userId));
     }
     catch (System.Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }
Ejemplo n.º 14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="accessKey"></param>
 /// <param name="siteId"></param>
 /// <param name="id"></param>
 /// <param name="username"></param>
 /// <param name="firstName"></param>
 /// <param name="lastName"></param>
 /// <param name="email"></param>
 /// <param name="password"></param>
 /// <param name="description"></param>
 /// <param name="isEnabled"></param>
 /// <param name="link"></param>
 /// <param name="imageurl"></param>
 /// <param name="gender"></param>
 /// <param name="birthday"></param>
 /// <param name="tel"></param>
 /// <param name="tel2"></param>
 /// <param name="address"></param>
 /// <param name="city"></param>
 /// <param name="state"></param>
 /// <param name="postalCode"></param>
 /// <param name="country"></param>
 /// <returns></returns>
 public bool Update(string accessKey, long siteId, long id, string username, string firstName, string lastName,
                    string email, string password, string description,
                    string link, string imageurl, string gender, DateTime?birthday, string tel, string tel2, string address, string city,
                    string state, string postalCode, string country)
 {
     try
     {
         return(SecureUpdate(accessKey, siteId, id, username, firstName, lastName,
                             email, password, description, link,
                             imageurl, gender, birthday, tel, tel2, address, city,
                             state, postalCode, country));
     }
     catch (Exception ex)
     {
         AwapiFaultException awEx = new AwapiFaultException();
         awEx.ErrorMessage = ex.Message;
         if (ex.InnerException != null)
         {
             awEx.ErrorMessage = ex.InnerException.Message;
         }
         throw new FaultException <AwapiFaultException>(awEx, new FaultReason(awEx.ErrorMessage));
     }
 }