You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
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
/// <summary>
/// 頁面加載事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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 += "<table id='gvSearchResult' >"; for (int intRows = 0; intRows < dbProgramLs.Rows.Count; intRows++) { strHTML += "<tr>"; //產生所有資料
for (int intCount = 0; intCount < dbProgramLs.Columns.Count; intCount++) { strHTML += "<td name=" + dbProgramLs.Columns[intCount].ColumnName + ">" + dbProgramLs.Rows[intRows][intCount].ToString(); strHTML += "</td>"; } //strHTML += "<td>" + dbProgramLs.Rows[intRows]["ProgramID"].ToString() + "</td>";
//strHTML += "<td>" + dbProgramLs.Rows[intRows]["ProgramName"].ToString() + "</td>";
//strHTML += "<td>" + dbProgramLs.Rows[intRows]["FilePath"].ToString() + "</td>";
//strHTML += "<td>" + dbProgramLs.Rows[intRows]["grouptag"].ToString() + "</td>";
strHTML += "</tr>"; } strHTML += "</table>"; 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
} }
|