Exemple #1
0
        public bool SetDelete(Guid id)
        {
            BASE_ROLE_INFO user = _roleRepository.Update(u => u.ROLE_INFO_ID == id && u.ROLE_INFO_TYPE.ToLower() != ServiceConstants.SystemRoleType, (u) =>
            {
                u.IsDel = 1;
            });

            if (user != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
 public static RoleContract ToContract(this BASE_ROLE_INFO source)
 {
     if (source == null)
     {
         throw new InvalidOperationException("source is null");
     }
     return(new RoleContract
     {
         Id = source.ROLE_INFO_ID,
         Name = source.ROLE_INFO_NAME,
         CreatedDate = source.ROLE_INFO_CREATEDDATE ?? DateTime.MinValue,
         ApplicationId = source.GLOBAL_TYPE_ID,
         Remark = source.ROLE_INFO_REMARK,
         Type = source.ROLE_INFO_TYPE,
         Createby = source.CREATEDBY,
         IsDel = source.IsDel ?? 0
     });
 }