日期:2014-05-18 浏览次数:21559 次
using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using ActiveDs;
using Velde;
namespace WebPart1
{
[Guid("0fcf1f6b-e232-4911-ae56-27158078c75d")]
public class WebPart1 : System.Web.UI.WebControls.WebParts.WebPart
{
public WebPart1()
{
}
protected override void CreateChildControls()
{
base.CreateChildControls();
// TODO: add custom rendering code here.
AD ad = new AD();
bool t5 = ad.createUserAccount("OU=te33fd,DC=BOM,DC=com", "wskty", "wskandwsk", "临", "时的", "2010-12-12");
Label label = new Label();
if (t5 == true)
Label.Text = "帐号为创建成功!";
else
Label.Text = "对不起,帐号未创建!";
//label.Text = "Hello World";
this.Controls.Add(label);
}
}
}