コード例 #1
0
 /// <summary>
 /// 设置帐号有效
 /// </summary>
 /// <param name="userId"></param>
 /// <param name="strMsg"></param>
 /// <returns></returns>
 public void NewSetUserEnable(string userId, out string strMsg)
 {
     strMsg = "";
     ExchangeServices.ExchangeServices objService = new InterActiveDirectory.ExchangeServices.ExchangeServices();
     objService.SetUserEnable(userId, out strMsg);
     //AdOperate.AD_ExchangePassWord adService = new InterActiveDirectory.AdOperate.AD_ExchangePassWord();
     //adService.SetExchangePassword(userId, false, out strMsg);
 }
コード例 #2
0
        public int AddUserMailBox(string userID, string emaliSuffix, string pwd)
        {
            ADVB.AdUser adUser = new ADVB.AdUser();
            ExchangeServices.ExchangeServices exs = new InterActiveDirectory.ExchangeServices.ExchangeServices();
            DirectoryEntry oUser = Iads.GetUserEntry(userID);

            try
            {
                oUser.Properties["l"].Value = "4";
                oUser.CommitChanges();
            }
            catch {}
            return(exs.AddUserMail(Iads.GetUser(userID), userID, emaliSuffix, pwd)?1:0);
        }
コード例 #3
0
ファイル: AD_Users.cs プロジェクト: JuRogn/OA
		public int AddUserMailBox(string userID,string emaliSuffix,string pwd)
		{
			ADVB.AdUser  adUser=new ADVB.AdUser();
			ExchangeServices.ExchangeServices exs=new InterActiveDirectory.ExchangeServices.ExchangeServices();
			DirectoryEntry oUser= Iads.GetUserEntry(userID);
			try
			{
				oUser.Properties["l"].Value="4";
				oUser.CommitChanges();
			}
			catch{}
			return  exs.AddUserMail(Iads.GetUser(userID),userID,emaliSuffix,pwd)?1:0;
		}
コード例 #4
0
ファイル: AD_Users.cs プロジェクト: JuRogn/OA
		/// <summary>
		/// 设置帐号有效
		/// </summary>
		/// <param name="userId"></param>
		/// <param name="strMsg"></param>
		/// <returns></returns>
		public void NewSetUserEnable(string userId,out string strMsg)
		{
			strMsg="";
            ExchangeServices.ExchangeServices objService = new InterActiveDirectory.ExchangeServices.ExchangeServices();
            objService.SetUserEnable(userId, out strMsg);
            //AdOperate.AD_ExchangePassWord adService = new InterActiveDirectory.AdOperate.AD_ExchangePassWord();
            //adService.SetExchangePassword(userId, false, out strMsg);
		}