Exemplo n.º 1
0
        public bool Delete(string Id)
        {
            bool Result = false;

            try
            {
                _userData.DeleteUserConnectorByUserId(Id);
                Result = _userData.Delete(Id);
            }
            catch (Exception)
            {
            }
            return(Result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除一个用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Delete(Guid id)
        {
            var organizeUsers = new OrganizeUser().GetListByUserId(id);//要删除人员与组织机构之间关系表
            var userModel     = Get(id);

            if (null == userModel)
            {
                return(0);
            }
            //同步企业微信人员
            if (Config.Enterprise_WeiXin_IsUse)
            {
                new EnterpriseWeiXin.Organize().DeleteUser(userModel.Account);
            }
            Log.Add("删除了一个用户-" + userModel.Name, userModel.ToString(), Log.Type.系统管理, others: Newtonsoft.Json.JsonConvert.SerializeObject(organizeUsers));
            return(userData.Delete(userModel, organizeUsers.ToArray()));
        }
Exemplo n.º 3
0
 public static void Delete(int userId)
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.User dU = new Data.User(moduleSettings);
     dU.Delete(userId);
 }
Exemplo n.º 4
0
 public static void Delete(string userID)
 {
     Data.User objData = new Data.User();
     objData.Delete(userID);
 }
Exemplo n.º 5
0
 public bool Delete()
 {
     Data.User user = new Data.User(PubConstant.ConnectionString);
     return(user.Delete(this.userID));
 }
Exemplo n.º 6
0
 /// <summary>
 /// 删除用户
 /// </summary>
 public bool Delete()
 {
     return(dataUser.Delete(userID));
 }