日期:2014-05-17 浏览次数:20760 次
protected void Page_Load(object sender, EventArgs e)
{
year = DateTime.Now.Year.ToString();
DirectoryInfo dirWeeks = new DirectoryInfo(@"C:\Inetpub\wwwroot\ProductionPlan\" + year);
weeks = dirWeeks.GetDirectories();
selectedWeek = weeks[weeks.Length - 1].ToString().Substring(0, 2)+"W";//嵟岪堦廃
lbWeek.Text = selectedWeek;//嵟岪堦廃
if (!IsPostBack)
{
// BindCombox();
WriteLog();
InitLinkButton();
lbYear.Text = year;
lbWeek.Text = selectedWeek;
lbKind.Text = ddlPlan.SelectedValue;
};
}
private void WriteLog()
{
StreamWriter sw;
System.IO.Directory.CreateDirectory(@"C:\Information");
sw = File.AppendText(@"C:\Information\logPH.txt");
IPHostEntry host = Dns.GetHostEntry(GetClientIP());
string MyHost = host.HostName;
// string Name=User.Identity.Name.ToString();
sw.WriteLine("庡婘?崋丗" + MyHost + ",????丗" + DateTime.Now);
//sw.WriteLine("庡婘?崋丗" + hname + ",梡?柤:" + Request.ServerVariables["LOGON_USER"] + "-----------" + DateTime.Now);