using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Windows.Forms; #region 程式異動記錄 ///程式代號:MainPage ///程式名稱:系統主頁面 ///程式說明: ///xx.YYYY/MM/DD VER AUTHOR COMMENTS(說明修改的內容) ///01.2012/07/25 1.0 Ethan CREATE #endregion namespace OT.Web { public partial class MainPage : Ap_Code.BasePage { #region 自定義變量區 // 自定義變量區 #endregion #region 公有方法區 // 公有方法區 #endregion #region 私有方法區 // 私有方法區 #endregion #region 頁面事件觸發區 // 頁面事件觸發區 #region Page_Load /// /// 頁面加載事件 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { OT.BLL.CommonClass o_Common_BLL = new OT.BLL.CommonClass(); DataSet dsFunction = o_Common_BLL.GetProgramListByModuleID("", gstrUserID); DataTable dbProgramLs = dsFunction.Tables[3]; //OT.BLL.OTB_SYS_ProgramList o_TB_SYS_ProgramList_BLL = new OT.BLL.OTB_SYS_ProgramList(); //int intEndRecordIndex = o_TB_SYS_ProgramList_BLL.GetListCount("", "", ""); //DataTable dbProgramLs = new DataTable(); //dbProgramLs = fnDataSetToDataTable(o_TB_SYS_ProgramList_BLL.GetList(0, intEndRecordIndex, "", "", "", "")); string strHTML = string.Empty; strHTML += ""; for (int intRows = 0; intRows < dbProgramLs.Rows.Count; intRows++) { strHTML += ""; //產生所有資料 for (int intCount = 0; intCount < dbProgramLs.Columns.Count; intCount++) { strHTML += ""; } //strHTML += ""; //strHTML += ""; //strHTML += ""; //strHTML += ""; strHTML += ""; } strHTML += "
" + dbProgramLs.Rows[intRows][intCount].ToString(); strHTML += "" + dbProgramLs.Rows[intRows]["ProgramID"].ToString() + "" + dbProgramLs.Rows[intRows]["ProgramName"].ToString() + "" + dbProgramLs.Rows[intRows]["FilePath"].ToString() + "" + dbProgramLs.Rows[intRows]["grouptag"].ToString() + "
"; divProgramList.InnerHtml = (strHTML); //頁面第一次加載 //ltrLoginName.Text = "Hello!!!" + GetUserNameByUserId(gstrUserID);//當前登錄者 HttpCookie FullScreen = new HttpCookie("isFullScreen"); FullScreen = Request.Cookies["isFullScreen"]; HttpCookie Already = new HttpCookie("Already"); Already = Request.Cookies["Already"]; DateTime now = DateTime.Now; if (FullScreen == null && Already != null) { Already.Value = now.ToString(); Already.Expires = now.AddYears(-1); Response.Cookies.Add(Already); SendKeys.SendWait("{F11}"); } if (FullScreen != null && Already == null) { Already = new HttpCookie("Already"); Already.Value = now.ToString(); Already.Expires = now.AddYears(1); Response.Cookies.Add(Already); SendKeys.SendWait("{F11}"); } } } #endregion #endregion } }