Beispiel #1
0
 /// <summary>
 /// Method To show the All Roles
 /// </summary>
 public void GetAllRoles(int userID)
 {
     try
     {
         CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
         FindUserProp objFindUserProp = new FindUserProp();
         var          lst             = _serviceInstance.GetRolesSelection(0);
         if (lst.Count() > 0)
         {
             RoleList = null;
             RoleList = lst.ToList();
             RoleList.Insert(0, new RoleList {
                 RoleName = "All"
             });
             RoleName = "All";
         }
     }
     catch (Exception ex)
     {
         LogHelper.LogErrorToDb(ex);
         bool displayErrorOnUI = false;
         CommonSettings.logger.LogError(this.GetType(), ex);
         if (displayErrorOnUI)
         {
             throw;
         }
     }
     finally
     {
         CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     }
 }