chore: 首次簽入 Thinkyu ASP.NET 專案

- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
2026-09-10 09:42:37 +08:00
commit 577060bc78
2496 changed files with 501389 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm3.Master" AutoEventWireup="true" CodeBehind="404.aspx.cs" Inherits="Education.Forms._404" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
li {
font-size: 12pt;
}
li span {
color: red;
font-weight:bold;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div style="margin-top: 30px; margin-left: 30px">
<div style="float: left; height: 128px;">
<img src="../picture/question.png" />
</div>
<div style="float: left; height: auto; margin-left: 10px">
<h2>您想去哪裡?</h2>
<ul>
<li>您要求的頁面不存在,請回到上一頁或是回到首頁。
</li>
</ul>
</div>
</div>
</asp:Content>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms
{
public partial class _404 : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+17
View File
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms
{
public partial class _404
{
}
}
+38
View File
@@ -0,0 +1,38 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm3.Master" AutoEventWireup="true" CodeBehind="500.aspx.cs" Inherits="Education.Forms._500" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
li {
font-size: 12pt;
}
li span {
color: red;
font-weight:bold;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div style="margin-top: 30px; margin-left: 30px">
<div style="float: left; height: 128px;">
<img src="../picture/bomb.png" />
</div>
<div style="float: left; height: auto; margin-left: 10px">
<h2>系統發生錯誤</h2>
<ul>
<li>很抱歉造成您的困擾,請回到上一頁再嘗試一次剛才的操作
<br />
<br />
</li>
<li>如果仍然發生錯誤,請通知系統工程師,並請提供以下的錯誤代碼:<br />
<br />
<asp:Label ID="lbErrCode" runat="server" Text=""></asp:Label>
<asp:Panel ID="Panel1" runat="server" Visible="false">
<br />
<asp:TextBox ID="txtErrLog" runat="server" TextMode="MultiLine" Rows="30" Columns="140" Font-Names="細明體" Font-Size="9pt"></asp:TextBox>
</asp:Panel>
</li>
</ul>
</div>
</div>
</asp:Content>
+24
View File
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace Education.Forms
{
public partial class _500 : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
lbErrCode.Text = Request["errcode"];
if (PublicVariable.DEBUG)
{
Panel1.Visible = true;
txtErrLog.Text = File.ReadAllText(Server.MapPath(string.Format(@"~/Log/{0}.txt", lbErrCode.Text)));
}
}
}
}
+44
View File
@@ -0,0 +1,44 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms
{
public partial class _500
{
/// <summary>
/// lbErrCode 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbErrCode;
/// <summary>
/// Panel1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Panel Panel1;
/// <summary>
/// txtErrLog 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtErrLog;
}
}
@@ -0,0 +1,27 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm3.Master" AutoEventWireup="true" CodeBehind="FileTooLarge.aspx.cs" Inherits="Education.Forms.Common.FileTooLarge" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
li {
font-size: 12pt;
}
li span {
color: red;
font-weight:bold;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div style="margin-top: 30px; margin-left: 30px">
<div style="float: left; height: 128px;">
<img src="../../picture/bomb.png" />
</div>
<div style="float: left; height: auto; margin-left: 10px">
<h2>上傳的檔案太大了</h2>
<ul>
<li>上傳的檔案大小請勿超過&nbsp;<asp:Label ID="lbFileLimit" runat="server" Text=""></asp:Label>&nbsp;kB
</li>
</ul>
</div>
</div>
</asp:Content>
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Web.Configuration;
using WebLib;
namespace Education.Forms.Common
{
public partial class FileTooLarge : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
HttpRuntimeSection section = (HttpRuntimeSection)ConfigurationManager.GetSection("system.web/httpRuntime");
lbFileLimit.Text = section.MaxRequestLength.ToString();
}
}
}
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.Common
{
public partial class FileTooLarge
{
/// <summary>
/// lbFileLimit 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbFileLimit;
}
}
@@ -0,0 +1,214 @@
using CrystalDecisions.Shared;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System;
using WebLib;
namespace Education
{
public class ReportBase
{
protected XSSFWorkbook workbook;
protected ISheet sheet;
protected WebLib.Excel excel;
protected IFont headerFont;
protected IFont footerFont;
protected IFont titleFont;
protected IFont titleFontBoldUnderLine;
protected IFont bodyFont;
protected ICellStyle headerStyle;
protected ICellStyle footerStyle;
protected ICellStyle titleStyleLeft;
protected ICellStyle titleStyleRight;
protected ICellStyle titleStyleCenter;
protected ICellStyle titleStyleCenterBottom;
protected ICellStyle titleStyleLeftNoBorder;
protected ICellStyle titleStyleRightNoBorder;
protected ICellStyle titleStyleCenterNoBorder;
protected ICellStyle titleStyleCenterBottomNoBorder;
protected ICellStyle titleStyleCenterUDBorder;
protected ICellStyle bodyStyleLeft;
protected ICellStyle bodyStyleRight;
protected ICellStyle bodyStyleCenter;
protected ICellStyle bodyNumberStyle;
protected ICellStyle bodyNumberStyleNoBorder;
protected ICellStyle bodyNumberStyleUDBorder;
protected ICellStyle bodyNumberStyle2;
protected ICellStyle bodyPercentStyle;
protected int HeaderRowHeight = 24;
protected int BodyRowHeight = 18;
public ReportBase()
{
Init();
}
protected virtual void Init()
{
workbook = new XSSFWorkbook();
sheet = workbook.CreateSheet("報表");
sheet.ForceFormulaRecalculation = true;
excel = new WebLib.Excel();
excel.WorkBook = workbook;
excel.Sheet = sheet;
headerFont = excel.NewFont("標楷體", 16, true);
footerFont = excel.NewFont("標楷體", 16);
titleFont = excel.NewFont("標楷體", 16, true);
titleFontBoldUnderLine = excel.NewFont("標楷體", 12, true);
titleFontBoldUnderLine.Underline = FontUnderlineType.Single;
bodyFont = excel.NewFont("標楷體", 12);
headerStyle = excel.NewCellStyle(headerFont, HorizontalAlignment.Center, VerticalAlignment.Center, true);
footerStyle = excel.NewCellStyle(footerFont, HorizontalAlignment.Left, VerticalAlignment.Center, true);
titleStyleLeft = excel.NewCellStyle(titleFont, HorizontalAlignment.Left, VerticalAlignment.Center, true);
/*
titleStyleLeft.BorderTop = BorderStyle.Thin;
titleStyleLeft.BorderBottom = BorderStyle.Thin;
titleStyleLeft.BorderLeft = BorderStyle.Thin;
titleStyleLeft.BorderRight = BorderStyle.Thin;
*/
titleStyleRight = excel.NewCellStyle(titleFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
/*
titleStyleRight.BorderTop = BorderStyle.Thin;
titleStyleRight.BorderBottom = BorderStyle.Thin;
titleStyleRight.BorderLeft = BorderStyle.Thin;
titleStyleRight.BorderRight = BorderStyle.Thin;
*/
titleStyleCenter = excel.NewCellStyle(titleFont, HorizontalAlignment.Center, VerticalAlignment.Center, true);
/*
titleStyleCenter.BorderTop = BorderStyle.Thin;
titleStyleCenter.BorderBottom = BorderStyle.Thin;
titleStyleCenter.BorderLeft = BorderStyle.Thin;
titleStyleCenter.BorderRight = BorderStyle.Thin;
*/
titleStyleCenterBottom = excel.NewCellStyle(titleFont, HorizontalAlignment.Center, VerticalAlignment.Bottom, true);
/*
titleStyleCenterBottom.BorderTop = BorderStyle.Thin;
titleStyleCenterBottom.BorderBottom = BorderStyle.Thin;
titleStyleCenterBottom.BorderLeft = BorderStyle.Thin;
titleStyleCenterBottom.BorderRight = BorderStyle.Thin;
*/
titleStyleLeftNoBorder = excel.NewCellStyle(titleFont, HorizontalAlignment.Left, VerticalAlignment.Center, true);
titleStyleRightNoBorder = excel.NewCellStyle(titleFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
titleStyleCenterNoBorder = excel.NewCellStyle(titleFont, HorizontalAlignment.Center, VerticalAlignment.Center, true);
titleStyleCenterBottomNoBorder = excel.NewCellStyle(titleFont, HorizontalAlignment.Center, VerticalAlignment.Bottom, true);
titleStyleCenterUDBorder = excel.NewCellStyle(titleFont, HorizontalAlignment.Center, VerticalAlignment.Center, true);
titleStyleCenterUDBorder.BorderTop = BorderStyle.Thin;
titleStyleCenterUDBorder.BorderBottom = BorderStyle.Thin;
bodyStyleLeft = excel.NewCellStyle(bodyFont, HorizontalAlignment.Left, VerticalAlignment.Center, true);
bodyStyleLeft.BorderTop = BorderStyle.Thin;
bodyStyleLeft.BorderBottom = BorderStyle.Thin;
bodyStyleLeft.BorderLeft = BorderStyle.Thin;
bodyStyleLeft.BorderRight = BorderStyle.Thin;
bodyStyleRight = excel.NewCellStyle(bodyFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
bodyStyleRight.BorderTop = BorderStyle.Thin;
bodyStyleRight.BorderBottom = BorderStyle.Thin;
bodyStyleRight.BorderLeft = BorderStyle.Thin;
bodyStyleRight.BorderRight = BorderStyle.Thin;
bodyStyleCenter = excel.NewCellStyle(bodyFont, HorizontalAlignment.Center, VerticalAlignment.Center, true);
bodyStyleCenter.BorderTop = BorderStyle.Thin;
bodyStyleCenter.BorderBottom = BorderStyle.Thin;
bodyStyleCenter.BorderLeft = BorderStyle.Thin;
bodyStyleCenter.BorderRight = BorderStyle.Thin;
IDataFormat numberFormat = workbook.CreateDataFormat();
bodyNumberStyle = excel.NewCellStyle(bodyFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
bodyNumberStyle.DataFormat = numberFormat.GetFormat("###,###,##0");
bodyNumberStyle.BorderTop = BorderStyle.Thin;
bodyNumberStyle.BorderBottom = BorderStyle.Thin;
bodyNumberStyle.BorderLeft = BorderStyle.Thin;
bodyNumberStyle.BorderRight = BorderStyle.Thin;
bodyNumberStyle2 = excel.NewCellStyle(bodyFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
bodyNumberStyle2.DataFormat = numberFormat.GetFormat("###,###,##0.00");
bodyNumberStyle2.BorderTop = BorderStyle.Thin;
bodyNumberStyle2.BorderBottom = BorderStyle.Thin;
bodyNumberStyle2.BorderLeft = BorderStyle.Thin;
bodyNumberStyle2.BorderRight = BorderStyle.Thin;
bodyPercentStyle = excel.NewCellStyle(bodyFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
bodyPercentStyle.DataFormat = numberFormat.GetFormat("##0.00");
bodyPercentStyle.BorderTop = BorderStyle.Thin;
bodyPercentStyle.BorderBottom = BorderStyle.Thin;
bodyPercentStyle.BorderLeft = BorderStyle.Thin;
bodyPercentStyle.BorderRight = BorderStyle.Thin;
bodyNumberStyleNoBorder = excel.NewCellStyle(bodyFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
bodyNumberStyleNoBorder.DataFormat = numberFormat.GetFormat("###,###,##0");
bodyNumberStyleUDBorder = excel.NewCellStyle(bodyFont, HorizontalAlignment.Right, VerticalAlignment.Center, true);
bodyNumberStyleUDBorder.DataFormat = numberFormat.GetFormat("###,###,##0");
bodyNumberStyleUDBorder.BorderTop = BorderStyle.Thin;
bodyNumberStyleUDBorder.BorderBottom = BorderStyle.Thin;
}
protected void SetPaperAndMargin(ISheet Asheet)
{
// 設定紙張
Asheet.PrintSetup.PaperSize = 9; // A4
Asheet.PrintSetup.Landscape = false; // 直向
// 列印格式
Asheet.PrintSetup.UsePage = true;
Asheet.PrintSetup.FitWidth = 1; // 將所有欄擠進 1 頁寬
Asheet.PrintSetup.FitHeight = 0; // 0 表示不指定幾頁
Asheet.HorizontallyCenter = true; // 水平置中
// 頁首頁尾
Asheet.Footer.Left = "列印日期:&D";
Asheet.Footer.Right = "頁數:&P";
// 紙張邊界
Asheet.PrintSetup.HeaderMargin = 0d;
Asheet.PrintSetup.FooterMargin = 0.3d;
Asheet.SetMargin(MarginType.TopMargin, 0.5d);
Asheet.SetMargin(MarginType.BottomMargin, 0.5d);
Asheet.SetMargin(MarginType.LeftMargin, 0.3d);
Asheet.SetMargin(MarginType.RightMargin, 0.3d);
}
protected void SetDataValue(int row, int col, ExportColumn column, object value, ICellStyle cellStyle)
{
if (column.MoneyFormat)
{
if (column.MondyDigits == 0)
excel.SetCellValue(row, col, DAC.GetDouble(value), bodyNumberStyle);
else
excel.SetCellValue(row, col, DAC.GetDouble(value), bodyNumberStyle2);
}
else if (!string.IsNullOrEmpty(column.Format))
{
excel.SetCellValue(row, col, String.Format(column.Format, value), cellStyle);
}
else
{
excel.SetCellValue(row, col, DAC.GetString(value), cellStyle);
}
}
}
public class ExportColumn
{
public string Key { get; set; }
public string Title { get; set; }
public int Width { get; set; }
public string FieldName { get; set; }
public string Format { get; set; } = string.Empty;
public bool MoneyFormat { get; set; } = false;
public int MondyDigits { get; set; } = 0;
public HorizontalAlignment Align { get; set; } = HorizontalAlignment.Left;
public string Comment { get; set; }
}
}
@@ -0,0 +1,6 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm2.Master" AutoEventWireup="true" CodeBehind="ShowContent.aspx.cs" Inherits="Education.Forms.辦訓前置作業.ShowContent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Label ID="Label1" runat="server"></asp:Label>
</asp:Content>
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.
{
public partial class ShowContent : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
switch (Request["type"])
{
case "CourseChange":
DAC_訓練課程異動通知 Dao異動通知 = new DAC_訓練課程異動通知(conn);
int id = DAC.GetInt32(Request["id"]);
int item = DAC.GetInt32(Request["item"]);
List d1 = Dao異動通知.SelectOne(id, item);
if (d1.Count > 0)
Label1.Text = d1[0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
break;
case "OnlineCourse":
id = DAC.GetInt32(Request["id"]);
DAC_數位課程 Dao數位課程 = new DAC_數位課程(conn);
List d2 = Dao數位課程.SelectOne(id);
if (d2.Count > 0)
Label1.Text = d2[0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
break;
}
}
}
}
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class ShowContent
{
/// <summary>
/// Label1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
}
}
@@ -0,0 +1,14 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm2.Master" AutoEventWireup="true" CodeBehind="ShowLargePicture.aspx.cs" Inherits="Education.Forms.Common.ShowLargePicture" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div style="margin: auto; text-align: center; vertical-align: middle;">
<asp:Image ID="Image1" runat="server" />
</div>
<script type="text/javascript">
window.onload = function () {
window.resizeTo(screen.width, screen.height);
};
</script>
</asp:Content>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.Common
{
public partial class ShowLargePicture : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
Image1.ImageUrl = Request["pic"] + "?now=" + DateTime.UtcNow.AddHours(8).Ticks.ToString();
}
}
}
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.Common
{
public partial class ShowLargePicture
{
/// <summary>
/// Image1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
}
}
@@ -0,0 +1,23 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowLargePicture1.aspx.cs"
Inherits="Education.Forms.基本資料.ShowLargePicture1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>大圖檢視</title>
</head>
<body>
<form id="form1" runat="server">
<div style="margin: auto; text-align: center; vertical-align: middle;">
<asp:Image ID="Image1" runat="server" />
</div>
</form>
<script type="text/javascript">
window.onload = function () {
window.resizeTo(screen.width, screen.height);
};
</script>
</body>
</html>
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class ShowLargePicture1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Image1.ImageUrl = Request["pic"] + "?now=" + DateTime.UtcNow.AddHours(8).Ticks.ToString();
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class ShowLargePicture1
{
/// <summary>
/// form1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Image1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
}
}
@@ -0,0 +1,17 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Education.Forms.Common.Test" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button runat="server" OnClick="btnSendMailTest_Click" ID="btnSendMailTest" Text="發送郵件測試" />
</div>
</form>
</body>
</html>
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.Common
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSendMailTest_Click(object sender, EventArgs e)
{
MailMessage mm = new MailMessage();
mm.Subject = "郵件發送測試";
mm.To.Add(new MailAddress("neo.sryang@gmail.com"));
mm.BodyEncoding = Encoding.UTF8;
mm.IsBodyHtml = true;
mm.Body = @"郵件發送測試";
MailService.Send(mm, "郵件發送測試");
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.Common
{
public partial class Test
{
/// <summary>
/// form1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// btnSendMailTest 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSendMailTest;
}
}
@@ -0,0 +1,86 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="訓練企劃搜尋.ascx.cs" Inherits="Education.Forms.Common.訓練企劃搜尋" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:ObjectDataSource ID="ds未上課" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select未上課" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds已截止未上課" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select已截止未上課" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds已上課未結案" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select已上課未結案" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds已上課" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select已上課" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds已結案" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select已結案" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds已簽核未結案" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select已簽核未結案" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds全部" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="Select全部" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="ds_ObjectCreating">
<SelectParameters>
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
<asp:ControlParameter ControlID="txtYear" Name="年" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<div style="line-height: 2em">
<div style="float: left; margin-right: 5px">
年度
<asp:TextBox ID="txtYear" runat="server" MaxLength="4" Columns="4"></asp:TextBox>
<asp:LinkButton ID="btnYearSearch" runat="server" CssClass="button blue120"
OnClick="btnYearSearch_Click">查詢年度課程</asp:LinkButton>
</div>
<div style="float: left; margin-right: 5px">
課程企劃
<weblib:WDropDownList ID="ddl課程企劃" runat="server" DataTextField="Name"
DataValueField="Value" style="max-width: 50em">
</weblib:WDropDownList>
<asp:LinkButton ID="btnOK" runat="server" CssClass="button blue120"
OnClick="btnOK_Click">查詢</asp:LinkButton>
</div>
<div style="float: left">
</div>
<div style="clear:both">
<asp:Label ID="lbHint" runat="server" Text="" ForeColor="Red" Font-Size="10pt"></asp:Label>
</div>
</div>
@@ -0,0 +1,148 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using WebLib;
namespace Education.Forms.Common
{
[DefaultProperty("訓練企劃編號")]
[DefaultEvent("Click")]
public partial class : UserControlBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (txtYear.Text == "")
{
txtYear.Text = DateTime.UtcNow.AddHours(8).Date.Year.ToString();
DoDataBind();
}
}
private void DoDataBind()
{
switch ()
{
case Enum.:
ddl課程企劃.DataSource = ds未上課;
lbHint.Text = "(還未上課的課程企劃)";
break;
case Enum.:
ddl課程企劃.DataSource = ds已截止未上課;
lbHint.Text = "(已截止報名,還未上課的課程企劃)";
break;
case Enum.:
ddl課程企劃.DataSource = ds已上課未結案;
lbHint.Text = "(已上課,還未結案的課程企劃)";
break;
case Enum.:
ddl課程企劃.DataSource = ds已上課;
lbHint.Text = "(已上課的課程企劃)";
break;
case Enum.:
ddl課程企劃.DataSource = ds已結案;
lbHint.Text = "(已結案的課程企劃)";
break;
case Enum.:
ddl課程企劃.DataSource = ds已簽核未結案;
lbHint.Text = "(已簽核未結案的課程企劃)";
break;
case Enum.:
ddl課程企劃.DataSource = ds全部;
lbHint.Text = "(全部課程企劃)";
break;
}
ddl課程企劃.DataBind();
}
protected void ds_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練課程企劃;
}
[DefaultValue(企劃狀態Enum.已上課未結案)]
public Enum
{
get
{
if (ViewState["訓練企劃狀態"] == null)
return Enum.;
else
return (Enum)ViewState["訓練企劃狀態"];
}
set
{
ViewState["訓練企劃狀態"] = value;
}
}
public int
{
get
{
return DAC.GetInt32(ddl課程企劃.SelectedValue);
}
}
public string
{
get
{
if (ddl課程企劃.SelectedItem != null)
return ddl課程企劃.SelectedItem.Text;
else
return "";
}
}
public string SearchButtonText
{
get
{
return btnOK.Text;
}
set
{
btnOK.Text = value;
}
}
public Control SearchButton
{
get
{
return btnOK;
}
}
public event EventHandler Click;
protected void btnOK_Click(object sender, EventArgs e)
{
Click(this, new EventArgs());
}
protected void btnYearSearch_Click(object sender, EventArgs e)
{
DoDataBind();
}
}
public enum Enum
{
,
,
,
,
,
,
}
}
@@ -0,0 +1,125 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.Common
{
public partial class
{
/// <summary>
/// ds未上課 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds未上課;
/// <summary>
/// ds已截止未上課 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds已截止未上課;
/// <summary>
/// ds已上課未結案 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds已上課未結案;
/// <summary>
/// ds已上課 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds已上課;
/// <summary>
/// ds已結案 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds已結案;
/// <summary>
/// ds已簽核未結案 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds已簽核未結案;
/// <summary>
/// ds全部 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds全部;
/// <summary>
/// txtYear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtYear;
/// <summary>
/// btnYearSearch 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnYearSearch;
/// <summary>
/// ddl課程企劃 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl課程企劃;
/// <summary>
/// btnOK 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnOK;
/// <summary>
/// lbHint 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbHint;
}
}
@@ -0,0 +1,4 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="起訖日顯示.ascx.cs" Inherits="Education.Forms.Common.起訖日顯示" %>
<asp:Label ID="lb起日" runat="server" Text="起日"></asp:Label>
<asp:Label ID="lb至" runat="server" Text="至"></asp:Label>
<asp:Label ID="lb迄日" runat="server" Text="迄日"></asp:Label>
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Education.Forms.Common
{
public partial class : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
[Bindable(true)]
public Object
{
get;
set;
}
[Bindable(true)]
public Object
{
get;
set;
}
[Bindable(true)]
[DefaultValue("yyyy-MM-dd")]
public string Format
{
get;
set;
}
public override void DataBind()
{
base.DataBind();
if (DesignMode)
return;
DateTime dt起日 = WebLib.DAC.GetDateTime();
DateTime dt迄日 = WebLib.DAC.GetDateTime();
if (dt起日.Ticks > 0)
{
lb起日.Text = dt起日.ToString(Format);
}
else
{
lb起日.Text = "";
}
if (dt迄日.Ticks > 0 && dt起日.CompareTo(dt迄日) != 0)
{
lb至.Text = "至";
lb迄日.Text = dt迄日.ToString(Format);
}
else
{
lb至.Text = "";
lb迄日.Text = "";
}
}
}
}
@@ -0,0 +1,44 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.Common
{
public partial class
{
/// <summary>
/// lb起日 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb起日;
/// <summary>
/// lb至 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb至;
/// <summary>
/// lb迄日 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb迄日;
}
}
@@ -0,0 +1,41 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="送簽.ascx.cs"
Inherits="Education.Forms.Common.送簽" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<table>
<tr>
<td class="captionCenter" colspan="3">
<asp:Label ID="Label18" runat="server" Text="送簽"></asp:Label>
</td>
<td class="captionCenter" colspan="3">
<asp:Label ID="Label20" runat="server" Text="撤簽"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label19" runat="server" Text="簽核人員"></asp:Label>
</td>
<td>
<weblib:WDropDownList ID="DropDownList1" runat="server">
</weblib:WDropDownList>
</td>
<td>
<asp:LinkButton ID="LinkButton8" runat="server"
CssClass="button blue80">送簽</asp:LinkButton>
</td>
<td class="caption">
<asp:Label ID="Label21" runat="server" Text="撤簽簽核人員"></asp:Label>
</td>
<td>
<weblib:WDropDownList ID="DropDownList2" runat="server">
</weblib:WDropDownList>
</td>
<td>
<asp:LinkButton ID="LinkButton9" runat="server"
CssClass="button orange80">撤簽</asp:LinkButton>
</td>
</tr>
</table>
<asp:Label ID="lbSignMessage" runat="server"
CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Education.Forms.Common
{
[DefaultBindingProperty("表單ID")]
public partial class : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public int ID
{
get;
set;
}
public string
{
get;
set;
}
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
public string ID
{
get;
set;
}
public int
{
get;
set;
}
public override void DataBind()
{
base.DataBind();
}
}
}
@@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.Common
{
public partial class
{
/// <summary>
/// Label18 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label18;
/// <summary>
/// Label20 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label20;
/// <summary>
/// Label19 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label19;
/// <summary>
/// DropDownList1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList DropDownList1;
/// <summary>
/// LinkButton8 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton8;
/// <summary>
/// Label21 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label21;
/// <summary>
/// DropDownList2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList DropDownList2;
/// <summary>
/// LinkButton9 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton9;
/// <summary>
/// lbSignMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbSignMessage;
}
}
+35
View File
@@ -0,0 +1,35 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
CodeBehind="Test01.aspx.cs" Inherits="Education.Forms.Test01" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<weblib:LookupTextBox ID="LookupTextBox1" runat="server" LookupConfigName="BPSN"
OutputControl="TextBox1" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="組織ID" HeaderText="組織ID" />
<asp:BoundField DataField="組織名稱" HeaderText="組織名稱" />
<asp:BoundField DataField="組織類別ID" HeaderText="組織類別ID" />
<asp:TemplateField HeaderText="上層ID">
<ItemTemplate>
<asp:Label runat="server" ID="lb上層ID" Text='<%# Eval("上層ID", "{0}") != "0" ? Eval("上層ID") : null %>' />
<weblib:WDropDownList ID="DropDownList1" runat="server"
SelectedValue='<%# Bind("上層ID") %>' OnDataBinding="DropDownList1_DataBinding">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
<asp:ListItem Value="5">5</asp:ListItem>
</weblib:WDropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="排序" HeaderText="排序" />
<asp:BoundField DataField="部門主管" HeaderText="部門主管" />
</Columns>
</asp:GridView>
</asp:Content>
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms
{
public partial class Test01 : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
DAC_組織圖 Dao組織圖 = new DAC_組織圖(conn);
List d = Dao組織圖.Select子樹(1, 1);
GridView1.DataSource = d;
GridView1.DataBind();
}
protected void DropDownList1_DataBinding(object sender, EventArgs e)
{
if (!(sender is DropDownList dd)
|| !(dd.Parent.Parent is GridViewRow row))
return;
string v = DataBinder.Eval(row.DataItem, "上層ID", "{0}");
if (dd.Items.FindByValue(v) == null)
{
dd.Items.Insert(0, new ListItem(v, v));
}
}
}
}
+62
View File
@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms
{
public partial class Test01
{
/// <summary>
/// LookupTextBox1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.LookupTextBox LookupTextBox1;
/// <summary>
/// TextBox1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextBox1;
/// <summary>
/// TextBox2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextBox2;
/// <summary>
/// TextBox3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextBox3;
/// <summary>
/// GridView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView GridView1;
}
}
@@ -0,0 +1,21 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master"
AutoEventWireup="true" CodeBehind="UnderConstruction.aspx.cs"
Inherits="Education.Forms.UnderConstruction" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.auto-style1
{
width: 256px;
height: 256px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<div style="font-size: 16pt; font-weight: bold; margin: 10px;">
本功能建構中...<br />
<img class="auto-style1"
src="../picture/Default/document-construction-icon.png" />
</div>
</asp:Content>
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms
{
public partial class UnderConstruction : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms
{
public partial class UnderConstruction
{
}
}
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 如需使用 web.config 轉換的詳細資訊,請造訪 http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
在下面的範例中,"SetAttributes" 轉換只會在 "Match" 定位程式找到
值為 "MyDB" 的屬性 "name" 時,才將 "connectionString" 的值變
更為使用 "ReleaseSQLServer"。
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
在下面的範例中,"Replace" 轉換將會取代 web.config 檔案
的整個 <customErrors> 區段。
請注意,因為在 <system.web> 節點之下
只有一個 customErrors 區段,所以不需要使用 "xdt:Locator" 屬性。
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 如需使用 web.config 轉換的詳細資訊,請造訪 http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
</configuration>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!--
如需如何設定 ASP.NET 應用程式的詳細資訊,請造訪
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>
@@ -0,0 +1,205 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm.Master" AutoEventWireup="true" CodeBehind="PlaceDetail.aspx.cs" Inherits="Education.Forms.基本資料.PlaceDetail" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="dsForm" runat="server"
DataObjectTypeName="Education.場地" DeleteMethod="DeleteOne"
InsertMethod="InsertOne"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" TypeName="Education.DAC_場地"
UpdateMethod="UpdateOne" OnObjectCreating="dsForm_ObjectCreating">
<SelectParameters>
<asp:QueryStringParameter Name="編號" QueryStringField="id" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:FormView ID="FormView1" runat="server"
EnableModelValidation="True" DataKeyNames="編號,DB_APPNO"
DataSourceID="dsForm" EnableViewState="False">
<ItemTemplate>
<table border="0"
style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 270px;"></td>
<td colspan="1" class="widthcontrol" style="width: 270px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號", "{0:0000}") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb單位名稱Label" runat="server" Text="單位名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb單位名稱" runat="server" Text='<%# Bind("單位名稱") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption" style="text-align: center" colspan="2">
<asp:Label ID="lb照片一Label" runat="server"
Text="照片 (點擊圖片檢視大圖)"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb場地名稱Label" runat="server" Text="場地名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb場地名稱" runat="server" Text='<%# Bind("場地名稱") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb場地類型Label" runat="server" Text="場地類型"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb場地類型" runat="server" CssClass="inputFull"
Text='<%# Bind("場地類型") %>'></asp:Label>
</td>
<td rowspan="8"
style="text-align: center; vertical-align: top;">
<asp:Image ID="Image1" runat="server"
ImageUrl='<%# Education.PublicVariable.場地照片路徑 + "T_" + Eval("編號", "{0:000000}") + "_1.jpg?now=" + DateTime.UtcNow.AddHours(8).Ticks.ToString() %>' />
</td>
<td rowspan="8"
style="text-align: center; vertical-align: top;">
<asp:Image ID="Image2" runat="server"
ImageUrl='<%# Education.PublicVariable.場地照片路徑 + "T_" + Eval("編號", "{0:000000}") + "_2.jpg?now=" + DateTime.UtcNow.AddHours(8).Ticks.ToString() %>' />
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb價格Label" runat="server" Text="價格"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb價格" runat="server" CssClass="inputFull"
Text='<%# Bind("價格") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb坪數Label" runat="server" Text="坪數"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb坪數" runat="server" CssClass="inputFull" Text='<%# Bind("坪數") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb容納人數Label" runat="server" Text="容納人數"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb容納人數" runat="server" CssClass="inputFull"
Text='<%# Bind("容納人數") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb地址_郵編Label" runat="server" Text="地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb地址_郵編" runat="server" CssClass="input"
Text='<%# Bind("地址_郵編") %>'></asp:Label>
<asp:Label ID="lb地址_縣市" runat="server" CssClass="input"
Text='<%# Bind("地址_縣市") %>'></asp:Label>
<asp:Label ID="lb地址_鄉鎮市區" runat="server" CssClass="input"
Text='<%# Bind("地址_鄉鎮市區") %>'></asp:Label>
<asp:Label ID="lb地址_街道地址" runat="server" CssClass="input"
Text='<%# Bind("地址_街道地址") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb捷運可到Label" runat="server" Text="交通便利"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Panel ID="Panel1" runat="server" Style="display: inline;"
Visible='<%# Eval("捷運可到", "{0}") == "Y" %>'>
<asp:Label ID="lb捷運分鐘Label" runat="server" Text="捷運"></asp:Label>
<asp:Label ID="lb捷運分鐘" runat="server" CssClass="input"
Text='<%# Bind("捷運分鐘") %>'></asp:Label>
<asp:Label ID="Label5" runat="server" Text="分鐘&nbsp;&nbsp;"></asp:Label>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" Style="display: inline;"
Visible='<%# Eval("公車可到", "{0}") == "Y" %>'>
<asp:Label ID="lb公車可到Label" runat="server" Text="公車"></asp:Label>
<asp:Label ID="lb公車分鐘" runat="server" CssClass="input"
Text='<%# Bind("公車分鐘") %>'></asp:Label>
<asp:Label ID="Label6" runat="server" Text="分鐘&nbsp;&nbsp;"></asp:Label>
</asp:Panel>
<asp:Panel ID="Panel3" runat="server" Style="display: inline;"
Visible='<%# Eval("火車可到", "{0}") == "Y" %>'>
<asp:Label ID="lb火車可到Label0" runat="server" Text="火車"></asp:Label>
<asp:Label ID="lb火車分鐘" runat="server" CssClass="input"
Text='<%# Bind("火車分鐘") %>'></asp:Label>
<asp:Label ID="lb火車可到Label" runat="server" Text="分鐘&nbsp;&nbsp;"></asp:Label>
</asp:Panel>
<asp:Panel ID="Panel4" runat="server" Style="display: inline;"
Visible='<%# Eval("步行可到", "{0}") == "Y" %>'>
<asp:Label ID="lb步行可到Label" runat="server" Text="步行"></asp:Label>
<asp:Label ID="lb步行分鐘" runat="server" CssClass="input"
Text='<%# Bind("步行分鐘") %>'></asp:Label>
<asp:Label ID="lb步行分鐘Label" runat="server" Text="分鐘"></asp:Label>
</asp:Panel>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb設備提供Label" runat="server" Text="設備提供"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb設備提供" runat="server" CssClass="inputFull"
Text='<%# Eval("設備提供", "{0}").Replace("\r\n", "<br/>") %>'></asp:Label>
&nbsp;
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯絡人Label" runat="server" Text="聯絡人"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb聯絡人" runat="server" CssClass="inputFull"
Text='<%# Bind("聯絡人") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb聯絡人電話Label" runat="server" Text="電話"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb聯絡人電話" runat="server" CssClass="inputFull"
Text='<%# Bind("聯絡人電話") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb傳真Label" runat="server" Text="傳真"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb傳真" runat="server" CssClass="inputFull"
Text='<%# Bind("傳真") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb電子郵件" runat="server" CssClass="inputFull"
Text='<%# Bind("電子郵件") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb備註" runat="server" CssClass="inputFull"
Text='<%# Eval("備註", "{0}").Replace("\r", "<br/>") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
</asp:Content>
@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using WebLib;
namespace Education.Forms.
{
public partial class PlaceDetail : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "場地詳情";
Form_View = FormView1;
}
protected override void FormView_ReadOnlyDataBound(object sender, EventArgs e)
{
base.FormView_ReadOnlyDataBound(sender, e);
int = 0;
Label lb編號 = (Form_View.FindControl("lb編號") as Label);
if (lb編號 != null)
= DAC.GetInt32(lb編號.Text);
Image image1 = (Form_View.FindControl("Image1") as Image);
if (image1 != null)
{
string[] tmp = image1.ImageUrl.Split('?');
if (tmp.Length > 0 && !File.Exists(Server.MapPath(tmp[0])))
{
image1.ImageUrl = "~/picture/nopicture.jpg";
image1.Attributes.Remove("onclick");
image1.Style.Remove("cursor");
}
else
{
image1.Attributes.Add("onclick", GetOpenWindowJS("../Common/ShowLargePicture.aspx", "_picture", "pic", String.Format(Education.PublicVariable. + "{0:000000}_1.jpg", )));
image1.Style.Add("cursor", "pointer");
}
}
Image image2 = (Form_View.FindControl("Image2") as Image);
if (image2 != null)
{
string[] tmp = image2.ImageUrl.Split('?');
if (tmp.Length > 0 && !File.Exists(Server.MapPath(tmp[0])))
{
image2.ImageUrl = "~/picture/nopicture.jpg";
image2.Attributes.Remove("onclick");
image2.Style.Remove("cursor");
}
else
{
image2.Attributes.Add("onclick", GetOpenWindowJS("../Common/ShowLargePicture.aspx", "_picture", "pic", String.Format(Education.PublicVariable. + "{0:000000}_2.jpg", )));
image2.Style.Add("cursor", "pointer");
}
}
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao場地;
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class PlaceDetail
{
/// <summary>
/// dsForm 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsForm;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
}
}
@@ -0,0 +1,196 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm.Master" AutoEventWireup="true" CodeBehind="TeacherDetail.aspx.cs" Inherits="Education.Forms.基本資料.TeacherDetail" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="dsForm" runat="server"
DataObjectTypeName="Education.講師" DeleteMethod="DeleteOne"
InsertMethod="InsertOne"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" TypeName="Education.DAC_講師"
UpdateMethod="UpdateOne" OnObjectCreating="dsForm_ObjectCreating">
<SelectParameters>
<asp:QueryStringParameter Name="編號" QueryStringField="id" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:FormView ID="FormView1" runat="server"
DataKeyNames="編號,DB_APPNO" DataSourceID="dsForm"
EnableModelValidation="True" EnableViewState="False">
<ItemTemplate>
<div>
<div style="float: left">
<table border="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 140px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 110px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號", "{0:0000}") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb姓名Label" runat="server" Text="姓名"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb姓名" runat="server" Text='<%# Bind("姓名") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb出生日期Label" runat="server" Text="出生日期"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb出生日期" runat="server" Text='<%# Eval("出生日期", "{0:yyyyMMdd}") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb性別Label" runat="server" Text="性別"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb性別" runat="server" Text='<%# Eval("性別", "{0}") == "M" ? "男" : "女" %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb身份證字號Label" runat="server" Text="身份證字號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb身份證字號" runat="server" Text='<%# Bind("身份證字號") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb電話Label" runat="server" Text="電話"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb電話" runat="server" Text='<%# Bind("電話") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb手機Label" runat="server" Text="手機"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb手機" runat="server" Text='<%# Bind("手機") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb電子郵件" runat="server" Text='<%# Bind("電子郵件") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb戶籍地址Label" runat="server" Text="戶籍地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb戶籍地址_郵編" runat="server" Text='<%# Bind("戶籍地址_郵編") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb戶籍地址_縣市" runat="server" Text='<%# Bind("戶籍地址_縣市") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb戶籍地址_鄉鎮市區" runat="server" Text='<%# Bind("戶籍地址_鄉鎮市區") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb戶籍地址_街道地址" runat="server" Text='<%# Bind("戶籍地址_街道地址") %>'
CssClass="input"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb居住地址Label" runat="server" Text="居住地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb居住地址_郵編" runat="server" Text='<%# Bind("居住地址_郵編") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb居住地址_縣市" runat="server" Text='<%# Bind("居住地址_縣市") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb居住地址_鄉鎮市區" runat="server" Text='<%# Bind("居住地址_鄉鎮市區") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb居住地址_街道地址" runat="server" Text='<%# Bind("居住地址_街道地址") %>'
CssClass="input"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb現職Label" runat="server" Text="現職"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb現職" runat="server" Text='<%# Bind("現職") %>'
CssClass="inputFull"></asp:Label>
&nbsp;
</td>
<td class="caption">
<asp:Label ID="lb學歷Label" runat="server" Text="學歷"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb學歷" runat="server" Text='<%# Bind("學歷") %>'
CssClass="inputFull"></asp:Label>
&nbsp;
</td>
<td class="caption">
<asp:Label ID="lb授課區域Label" runat="server" Text="授課區域"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb授課區域" runat="server" Text='<%# Bind("授課區域") %>'
CssClass="inputFull"></asp:Label>
&nbsp;
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb授課專長領域Label" runat="server" Text="授課專長領域"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb授課專長領域" runat="server" Text='<%# Eval("授課專長領域", "{0}").Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb授課經歷概述Label" runat="server" Text="授課經歷概述"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb授課經歷概述" runat="server" Text='<%# Eval("授課經歷概述", "{0}").Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb重要經歷Label" runat="server" Text="重要經歷"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb重要經歷" runat="server" Text='<%# Eval("重要經歷", "{0}").Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb重要研究與著作Label" runat="server" Text="重要研究與著作"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb重要研究與著作" runat="server" Text='<%# Eval("重要研究與著作", "{0}").Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
</div>
<div style="float: left; width: 400px; height: 280px; margin-left: 5px; text-align: center; vertical-align: middle;">
<asp:Image ID="Image1" runat="server"
ImageUrl='<%# Education.PublicVariable.講師照片路徑 + "T_" + Eval("編號", "{0:000000}") + ".jpg?now=" + DateTime.UtcNow.AddHours(8).Ticks.ToString() %>'
EnableViewState="False" />
</div>
</div>
</ItemTemplate>
</asp:FormView>
</asp:Content>
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using WebLib;
namespace Education.Forms.
{
public partial class TeacherDetail : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "講師查詢";
Form_View = FormView1;
}
protected override void FormView_ReadOnlyDataBound(object sender, EventArgs e)
{
base.FormView_ReadOnlyDataBound(sender, e);
int = 0;
Label lb編號 = (Form_View.FindControl("lb編號") as Label);
if (lb編號 != null)
= DAC.GetInt32(lb編號.Text);
Image image1 = (Form_View.FindControl("Image1") as Image);
if (image1 != null)
{
string[] tmp = image1.ImageUrl.Split('?');
if (tmp.Length > 0 && !File.Exists(Server.MapPath(tmp[0])))
{
image1.ImageUrl = "~/picture/nopicture.jpg";
image1.Attributes.Remove("onclick");
image1.Style.Remove("cursor");
}
else
{
image1.Attributes.Add("onclick", GetOpenWindowJS("../Common/ShowLargePicture.aspx", "_picture", "pic", String.Format(Education.PublicVariable. + "{0:000000}.jpg", )));
image1.Style.Add("cursor", "pointer");
}
}
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao講師;
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class TeacherDetail
{
/// <summary>
/// dsForm 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsForm;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,354 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
private bool fileOK = false;
private int ;
private string ;
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "場地基本資料";
= Server.MapPath(Education.PublicVariable.);
Form_View = FormView1;
Grid_View = GridView1;
FormView_DataSource = dsForm;
GridView_DataSource = dsGrid;
AddTabButton(MultiView1, 0, btnSearchTab);
AddTabButton(MultiView1, 1, btnProcessTab);
if (!IsPostBack)
{
BindSearchDDL();
ActivateTab(MultiView1, 1);
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
}
if (Form_View.CurrentMode != FormViewMode.ReadOnly)
{
Grid_View.Visible = false;
}
}
private void BindSearchDDL()
{
ddl場地地區.DataSource = Dao場地.Select地區ForDropDown();
ddl場地地區.DataTextField = "Name";
ddl場地地區.DataValueField = "Value";
ddl場地地區.DataBind();
ddl場地教室類型.DataSource = Dao場地.Select教室類型ForDropDown();
ddl場地教室類型.DataTextField = "Name";
ddl場地教室類型.DataValueField = "Value";
ddl場地教室類型.DataBind();
}
protected override void CalcFields(object sender, ObjectDataSourceMethodEventArgs e)
{
base.CalcFields(sender, e);
}
protected override void FormView_ReadOnlyDataBound(object sender, EventArgs e)
{
base.FormView_ReadOnlyDataBound(sender, e);
int = 0;
Label lb編號 = FindControl<Label>(Form_View, "lb編號");
if (lb編號 != null)
= DAC.GetInt32(lb編號.Text);
Image image1 = FindControl<Image>(Form_View, "Image1");
if (image1 != null)
{
string[] tmp = image1.ImageUrl.Split('?');
if (tmp.Length > 0 && !File.Exists(Server.MapPath(tmp[0])))
{
image1.ImageUrl = "~/picture/nopicture.jpg";
image1.Attributes.Remove("onclick");
image1.Style.Remove("cursor");
}
else
{
image1.Attributes.Add("onclick", GetOpenWindowJS("../Common/ShowLargePicture.aspx", "_picture", "pic", String.Format(Education.PublicVariable. + "{0:000000}_1.jpg", )));
image1.Style.Add("cursor", "pointer");
}
}
Image image2 = FindControl<Image>(Form_View, "Image2");
if (image2 != null)
{
string[] tmp = image2.ImageUrl.Split('?');
if (tmp.Length > 0 && !File.Exists(Server.MapPath(tmp[0])))
{
image2.ImageUrl = "~/picture/nopicture.jpg";
image2.Attributes.Remove("onclick");
image2.Style.Remove("cursor");
}
else
{
image2.Attributes.Add("onclick", GetOpenWindowJS("../Common/ShowLargePicture.aspx", "_picture", "pic", String.Format(Education.PublicVariable. + "{0:000000}_2.jpg", )));
image2.Style.Add("cursor", "pointer");
}
}
System.Data.DataTable 滿 = Dao場地.Select滿意度統計();
if (滿.Rows.Count > 0)
{
Label lb5分 = FindControl<Label>(Form_View, "lb5分");
Label lb4分 = FindControl<Label>(Form_View, "lb4分");
Label lb3分 = FindControl<Label>(Form_View, "lb3分");
Label lb2分 = FindControl<Label>(Form_View, "lb2分");
Label lb1分 = FindControl<Label>(Form_View, "lb1分");
Label lb總分 = FindControl<Label>(Form_View, "lb總分");
if (lb5分 != null)
lb5分.Text = DAC.GetString(滿.Rows[0]["場地滿意度5"]);
if (lb4分 != null)
lb4分.Text = DAC.GetString(滿.Rows[0]["場地滿意度4"]);
if (lb3分 != null)
lb3分.Text = DAC.GetString(滿.Rows[0]["場地滿意度3"]);
if (lb2分 != null)
lb2分.Text = DAC.GetString(滿.Rows[0]["場地滿意度2"]);
if (lb1分 != null)
lb1分.Text = DAC.GetString(滿.Rows[0]["場地滿意度1"]);
if (lb總分 != null)
lb總分.Text = String.Format("{0:##0.00}", 滿.Rows[0]["場地滿意度總分"]);
}
RegisterPostbackTrigger(Form_View.FindControl("btnUploadPhoto1"));
RegisterPostbackTrigger(Form_View.FindControl("btnUploadPhoto2"));
}
protected override void FormView_InsertDataBound(object sender, EventArgs e)
{
base.FormView_InsertDataBound(sender, e);
FormViewSetControlValue("txt價格", "0");
FormViewSetControlValue("txt坪數", "0");
FormViewSetControlValue("txt容納人數", "0");
FormViewSetControlValue("txt捷運分鐘", "0");
FormViewSetControlValue("txt公車分鐘", "0");
FormViewSetControlValue("txt火車分鐘", "0");
FormViewSetControlValue("txt步行分鐘", "0");
}
protected override void FormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
base.FormView_ItemInserted(sender, e);
//FileUpload fu1 = Form_View.FindControl("fuPhoto1") as FileUpload;
//FileUpload fu2 = Form_View.FindControl("fuPhoto2") as FileUpload;
// 儲存照片與縮圖(fu1, fu2, 新編號);
BindSearchDDL();
}
protected override void FormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
{
base.FormView_ItemUpdated(sender, e);
//FileUpload fu1 = Form_View.FindControl("fuPhoto1") as FileUpload;
//FileUpload fu2 = Form_View.FindControl("fuPhoto2") as FileUpload;
//儲存照片與縮圖(fu1, fu2, DAC.GetInt32(e.Keys["編號"]));
BindSearchDDL();
}
protected override void FormView_ItemDeleting(object sender, FormViewDeleteEventArgs e)
{
base.FormView_ItemDeleting(sender, e);
if (Dao場地.IsOccipued(DAC.GetInt32(e.Keys["編號"])))
{
ClientShowMessage("此場地已經選用過,不可刪除!");
e.Cancel = true;
}
}
protected override void FormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
base.FormView_ItemDeleted(sender, e);
// 刪除縮圖與大圖
string s1 = String.Format("{0}T_{1:000000}_1.jpg", , e.Keys["編號"]);
string s2 = String.Format("{0}T_{1:000000}_2.jpg", , e.Keys["編號"]);
string s3 = String.Format("{0}{1:000000}_1.jpg", , e.Keys["編號"]);
string s4 = String.Format("{0}{1:000000}_2.jpg", , e.Keys["編號"]);
if (File.Exists(s1))
File.Delete(s1);
if (File.Exists(s2))
File.Delete(s2);
if (File.Exists(s3))
File.Delete(s3);
if (File.Exists(s4))
File.Delete(s4);
BindSearchDDL();
}
protected override void FormView_DataSource_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
base.FormView_DataSource_Inserted(sender, e);
= DAC.GetInt32(e.ReturnValue);
}
protected override void FormView_ItemCommand(object sender, FormViewCommandEventArgs e)
{
base.FormView_ItemCommand(sender, e);
if (e.CommandName == "刪除圖片1")
{
string s1 = String.Format("{0}T_{1:000000}_1.jpg", , DAC.GetInt32(e.CommandArgument));
string s3 = String.Format("{0}{1:000000}_1.jpg", , DAC.GetInt32(e.CommandArgument));
if (File.Exists(s1))
File.Delete(s1);
if (File.Exists(s3))
File.Delete(s3);
Form_View.DataBind();
}
if (e.CommandName == "刪除圖片2")
{
string s2 = String.Format("{0}T_{1:000000}_2.jpg", , DAC.GetInt32(e.CommandArgument));
string s4 = String.Format("{0}{1:000000}_2.jpg", , DAC.GetInt32(e.CommandArgument));
if (File.Exists(s2))
File.Delete(s2);
if (File.Exists(s4))
File.Delete(s4);
Form_View.DataBind();
}
if (e.CommandName == "上傳照片1")
{
FileUpload fu = FindControl<FileUpload>(Form_View, "fuPhoto1");
CheckPhoto(fu, out fileOK);
(fu, DAC.GetInt32(e.CommandArgument), 1);
Form_View.DataBind();
}
if (e.CommandName == "上傳照片2")
{
FileUpload fu = FindControl<FileUpload>(Form_View, "fuPhoto2");
CheckPhoto(fu, out fileOK);
(fu, DAC.GetInt32(e.CommandArgument), 2);
Form_View.DataBind();
}
}
protected override void GridView_DataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
base.GridView_DataSource_Selected(sender, e);
if (MultiView1.ActiveViewIndex == 0)
{
if (e.ReturnValue is List list && list.Count > 0)
ActivateTab(MultiView1, 1);
else
lbMessage.Text = "找不到合乎條件的資料";
}
}
protected void (FileUpload fu1, int , int )
{
if (fileOK)
{
string tFullName = String.Format("{0}T_{1:000000}_{2}.jpg", , , );
MemoryStream ms = PictureProcess.(fu1.PostedFile.InputStream, 300, 300);
File.WriteAllBytes(tFullName, ms.ToArray());
ms.Dispose();
tFullName = String.Format("{0}{1:000000}_{2}.jpg", , , );
ms = PictureProcess.(fu1.PostedFile.InputStream, 1200, 1200);
File.WriteAllBytes(tFullName, ms.ToArray());
ms.Dispose();
}
/*
if (file2OK)
{
string tFullName = String.Format("{0}T_{1:000000}_2.jpg", 圖檔儲存路徑, 編號);
MemoryStream ms = PictureProcess.縮圖(fu2.PostedFile.InputStream, 270, 270);
File.WriteAllBytes(tFullName, ms.ToArray());
ms.Dispose();
tFullName = String.Format("{0}{1:000000}_2.jpg", 圖檔儲存路徑, 編號);
ms = PictureProcess.縮圖(fu2.PostedFile.InputStream, 1200, 1200);
File.WriteAllBytes(tFullName, ms.ToArray());
ms.Dispose();
}
*/
}
protected void cvPhoto1_ServerValidate(object source, ServerValidateEventArgs args)
{
FileUpload fu = FindControl<FileUpload>(Form_View, "fuPhoto1");
args.IsValid = CheckPhoto(fu, out fileOK);
}
protected void cvPhoto2_ServerValidate(object source, ServerValidateEventArgs args)
{
FileUpload fu = FindControl<FileUpload>(Form_View, "fuPhoto2");
args.IsValid = CheckPhoto(fu, out fileOK);
}
protected bool CheckPhoto(FileUpload fu, out bool fileOK)
{
// 處理上傳照片
string ext = "";
fileOK = false;
if (fu.HasFile && fu.PostedFile.ContentType.ToLower().IndexOf("image") >= 0)
{
// 檢查副檔名
ext = Path.GetExtension(fu.FileName).ToLower();
String[] allowedExt = { ".gif", ".jpeg", ".jpg", ".png" };
for (int i = 0; i < allowedExt.Length; i++)
{
if (ext == allowedExt[i])
{
fileOK = true;
}
}
// 檢查檔案大小
if (fileOK && fu.PostedFile.ContentLength < 5242880)
fileOK = true;
else
fileOK = false;
return fileOK;
}
else
{
return false;
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Grid_View.PageIndex = 0;
Grid_View.DataBind();
}
protected void btnClear_Click(object sender, EventArgs e)
{
ddl場地地區.SelectedValue = "";
txt場地價格1.Text = "";
txt場地價格2.Text = "";
txt場地人數1.Text = "";
txt場地人數2.Text = "";
ddl場地教室類型.SelectedValue = "";
txt場地滿意度1.Text = "";
txt場地滿意度2.Text = "";
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao場地;
}
}
}
@@ -0,0 +1,278 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// btnProcessTab 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnProcessTab;
/// <summary>
/// btnSearchTab 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnSearchTab;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// Label10 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label10;
/// <summary>
/// ddl場地地區 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl場地地區;
/// <summary>
/// Label11 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label11;
/// <summary>
/// txt場地價格1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地價格1;
/// <summary>
/// Label15 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label15;
/// <summary>
/// txt場地價格2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地價格2;
/// <summary>
/// Label12 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label12;
/// <summary>
/// txt場地人數1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地人數1;
/// <summary>
/// Label16 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label16;
/// <summary>
/// txt場地人數2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地人數2;
/// <summary>
/// Label24 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label24;
/// <summary>
/// ddl場地教室類型 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl場地教室類型;
/// <summary>
/// Label14 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label14;
/// <summary>
/// txt場地滿意度1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地滿意度1;
/// <summary>
/// Label17 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label17;
/// <summary>
/// txt場地滿意度2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地滿意度2;
/// <summary>
/// btnSearch 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnSearch;
/// <summary>
/// btnClear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnClear;
/// <summary>
/// lbMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessage;
/// <summary>
/// View處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View處理;
/// <summary>
/// dsForm 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsForm;
/// <summary>
/// dsGrid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsGrid;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
/// <summary>
/// GridView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView GridView1;
/// <summary>
/// View照片 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View照片;
}
}
@@ -0,0 +1,218 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="查詢作業.aspx.cs" Inherits="Education.Forms.基本資料.查詢作業" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="ds場地" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="查詢作業" TypeName="Education.DAC_場地">
<SelectParameters>
<asp:Parameter DefaultValue="false" Name="noInputReturnAll" Type="Boolean" />
<asp:ControlParameter ControlID="ddl場地地區" DefaultValue="" Name="地區" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="txt場地價格1" Name="價格1" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="txt場地價格2" Name="價格2" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="txt場地人數1" Name="人數1" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="txt場地人數2" Name="人數2" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="ddl場地教室類型" Name="場地類型" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="txt場地滿意度1" Name="滿意度1" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="txt場地滿意度2" Name="滿意度2" PropertyName="Text" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds講師" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="查詢作業" TypeName="Education.DAC_講師">
<SelectParameters>
<asp:Parameter DefaultValue="false" Name="noInputReturnAll" Type="Boolean" />
<asp:ControlParameter ControlID="ddl講師地區" DefaultValue="" Name="地區" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="txt講師專長" Name="專長" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txt講師學歷" Name="學歷" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txt講師滿意度1" Name="滿意度1" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="txt講師滿意度2" Name="滿意度2" PropertyName="Text" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<table>
<tr>
<td class="captionCenter" colspan="4">
<asp:Label ID="Label9" runat="server" Text="場地查詢"></asp:Label>
</td>
<td style="width: 30px">&nbsp;</td>
<td class="captionCenter" colspan="4">
<asp:Label ID="Label18" runat="server" Text="講師查詢"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label10" runat="server" Text="地區"></asp:Label>
</td>
<td class="datainput" colspan="3">
<weblib:WDropDownList ID="ddl場地地區" runat="server" CssClass="inputFull">
</weblib:WDropDownList>
</td>
<td class="datainput">&nbsp;</td>
<td class="caption">
<asp:Label ID="Label19" runat="server" Text="地區"></asp:Label>
</td>
<td class="datainput" colspan="3">
<weblib:WDropDownList ID="ddl講師地區" runat="server" CssClass="inputFull">
</weblib:WDropDownList>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label11" runat="server" Text="價格"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt場地價格1" runat="server"></asp:TextBox>
</td>
<td class="datainput">
<asp:Label ID="Label15" runat="server" Text="至"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt場地價格2" runat="server"></asp:TextBox>
</td>
<td class="datainput">&nbsp;</td>
<td class="caption">
<asp:Label ID="Label21" runat="server" Text="專長"></asp:Label>
</td>
<td class="datainput" colspan="3">
<asp:TextBox ID="txt講師專長" runat="server" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label12" runat="server" Text="容納人數"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt場地人數1" runat="server"></asp:TextBox>
</td>
<td class="datainput">
<asp:Label ID="Label16" runat="server" Text="至"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt場地人數2" runat="server"></asp:TextBox>
</td>
<td class="datainput">&nbsp;</td>
<td class="caption">
<asp:Label ID="Label22" runat="server" Text="學歷"></asp:Label>
</td>
<td class="datainput" colspan="3">
<asp:TextBox ID="txt講師學歷" runat="server" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label13" runat="server" Text="教室類型"></asp:Label>
</td>
<td class="datainput" colspan="3">
<weblib:WDropDownList ID="ddl場地教室類型" runat="server" CssClass="inputFull">
</weblib:WDropDownList>
</td>
<td class="datainput">&nbsp;</td>
<td class="caption">
<asp:Label ID="Label20" runat="server" Text="滿意度"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt講師滿意度1" runat="server"></asp:TextBox>
</td>
<td class="datainput">
<asp:Label ID="Label23" runat="server" Text="至"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt講師滿意度2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label14" runat="server" Text="滿意度"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt場地滿意度1" runat="server"></asp:TextBox>
</td>
<td class="datainput">
<asp:Label ID="Label17" runat="server" Text="至"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt場地滿意度2" runat="server"></asp:TextBox>
</td>
<td class="datainput">&nbsp;</td>
<td class="datainput" colspan="4">
<asp:LinkButton ID="btn查詢2" runat="server" CssClass="button blue80" OnClick="btn查詢2_Click">查詢</asp:LinkButton>
<asp:LinkButton ID="btn清除2" runat="server" CssClass="button orange80" OnClick="btn清除2_Click">清除</asp:LinkButton>
</td>
</tr>
<tr>
<td class="datainput" colspan="4">
<asp:LinkButton ID="btn查詢1" runat="server" CssClass="button blue80" OnClick="btn查詢1_Click">查詢</asp:LinkButton>
<asp:LinkButton ID="btn清除1" runat="server" CssClass="button orange80" OnClick="btn清除1_Click">清除</asp:LinkButton>
</td>
</tr>
</table>
<asp:Panel ID="pnl場地" runat="server">
<h3>場地查詢結果</h3>
<asp:GridView ID="gv場地" runat="server" AutoGenerateColumns="False" DataKeyNames="編號" DataSourceID="ds場地" EnableModelValidation="True" EnableViewState="False" OnDataBound="gv場地_DataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="button blue60" OnClientClick='<%# GetOpenWindowJS("PlaceDetail.aspx", "_placeDetail", "id", Eval("編號")) %>'>詳情</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="編號" HeaderText="編號" ReadOnly="True" SortExpression="編號" DataFormatString="{0:0000}" />
<asp:BoundField DataField="單位名稱" HeaderText="單位名稱" SortExpression="單位名稱" />
<asp:BoundField DataField="場地名稱" HeaderText="場地名稱" SortExpression="場地名稱" />
<asp:BoundField DataField="場地類型" HeaderText="場地類型" SortExpression="場地類型" />
<asp:BoundField DataField="價格" HeaderText="價格" SortExpression="價格" />
<asp:BoundField DataField="坪數" HeaderText="坪數" SortExpression="坪數" />
<asp:BoundField DataField="容納人數" HeaderText="容納人數" SortExpression="容納人數" />
<asp:TemplateField HeaderText="地址" SortExpression="地址_郵編">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("地址_郵編") %>'></asp:Label>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("地址_縣市") %>'></asp:Label>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("地址_鄉鎮市區") %>'></asp:Label>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("地址_街道地址") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="聯絡人" HeaderText="聯絡人" SortExpression="聯絡人" />
<asp:BoundField DataField="聯絡人電話" HeaderText="聯絡人電話" SortExpression="聯絡人電話" />
<asp:BoundField DataField="電子郵件" HeaderText="電子郵件" SortExpression="電子郵件" />
<asp:BoundField DataField="傳真" HeaderText="傳真" SortExpression="傳真" />
</Columns>
<EmptyDataTemplate>
<asp:Label ID="Label24" runat="server" CssClass="ErrorMessage" Text="查無符合條件的資料,請輸入其他查詢條件"></asp:Label>
</EmptyDataTemplate>
<PagerTemplate>
<weblib:GridViewPager ID="GridViewPager2" runat="server" />
</PagerTemplate>
</asp:GridView>
</asp:Panel>
<asp:Panel ID="pnl講師" runat="server">
<h3>講師查詢結果</h3>
<asp:GridView ID="gv講師" runat="server" AutoGenerateColumns="False" DataKeyNames="編號" DataSourceID="ds講師" EnableModelValidation="True" EnableViewState="False" OnDataBound="gv講師_DataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="button blue60" OnClientClick='<%# GetOpenWindowJS("TeacherDetail.aspx", "_teacherDetail", "id", Eval("編號")) %>'>詳情</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="編號" HeaderText="編號" ReadOnly="True" SortExpression="編號" DataFormatString="{0:0000}" />
<asp:BoundField DataField="姓名" HeaderText="姓名" SortExpression="姓名" />
<asp:BoundField DataField="電話" HeaderText="電話" SortExpression="電話" />
<asp:BoundField DataField="手機" HeaderText="手機" SortExpression="手機" />
<asp:BoundField DataField="電子郵件" HeaderText="電子郵件" SortExpression="電子郵件" />
<asp:TemplateField HeaderText="居住地址" SortExpression="居住地址_郵編">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("居住地址_郵編") %>'></asp:Label>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("居住地址_縣市") %>'></asp:Label>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("居住地址_鄉鎮市區") %>'></asp:Label>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("居住地址_街道地址") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="學歷" HeaderText="學歷" SortExpression="學歷" />
<asp:BoundField DataField="授課區域" HeaderText="授課區域" SortExpression="授課區域" />
<asp:BoundField DataField="授課專長領域" HeaderText="授課專長領域" SortExpression="授課專長領域" />
</Columns>
<EmptyDataTemplate>
<asp:Label ID="Label24" runat="server" CssClass="ErrorMessage" Text="查無符合條件的資料,請輸入其他查詢條件"></asp:Label>
</EmptyDataTemplate>
<PagerTemplate>
<weblib:GridViewPager ID="GridViewPager1" runat="server" />
</PagerTemplate>
</asp:GridView>
</asp:Panel>
</asp:Content>
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "查詢作業";
if (!IsPostBack)
{
ddl場地地區.DataSource = Dao場地.Select地區ForDropDown();
ddl場地地區.DataTextField = "Name";
ddl場地地區.DataValueField = "Value";
ddl場地地區.DataBind();
ddl講師地區.DataSource = Dao講師.Select地區ForDropDown();
ddl講師地區.DataTextField = "Name";
ddl講師地區.DataValueField = "Value";
ddl講師地區.DataBind();
ddl場地教室類型.DataSource = Dao場地.Select教室類型ForDropDown();
ddl場地教室類型.DataTextField = "Name";
ddl場地教室類型.DataValueField = "Value";
ddl場地教室類型.DataBind();
}
else
{
gv場地.DataBind();
gv講師.DataBind();
}
}
protected void btn查詢1_Click(object sender, EventArgs e)
{
}
protected void btn清除1_Click(object sender, EventArgs e)
{
ddl場地地區.SelectedValue = "";
txt場地價格1.Text = "";
txt場地價格2.Text = "";
txt場地人數1.Text = "";
txt場地人數2.Text = "";
ddl場地教室類型.SelectedValue = "";
txt場地滿意度1.Text = "";
txt場地滿意度2.Text = "";
}
protected void btn查詢2_Click(object sender, EventArgs e)
{
}
protected void btn清除2_Click(object sender, EventArgs e)
{
ddl講師地區.SelectedValue = "";
txt講師專長.Text = "";
txt講師學歷.Text = "";
txt講師滿意度1.Text = "";
txt講師滿意度2.Text = "";
}
protected void gv場地_DataBound(object sender, EventArgs e)
{
pnl場地.Visible = gv場地.Rows.Count > 0;
}
protected void gv講師_DataBound(object sender, EventArgs e)
{
pnl講師.Visible = gv講師.Rows.Count > 0;
}
}
}
@@ -0,0 +1,359 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// ds場地 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds場地;
/// <summary>
/// ds講師 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds講師;
/// <summary>
/// Label9 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label9;
/// <summary>
/// Label18 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label18;
/// <summary>
/// Label10 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label10;
/// <summary>
/// ddl場地地區 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl場地地區;
/// <summary>
/// Label19 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label19;
/// <summary>
/// ddl講師地區 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl講師地區;
/// <summary>
/// Label11 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label11;
/// <summary>
/// txt場地價格1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地價格1;
/// <summary>
/// Label15 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label15;
/// <summary>
/// txt場地價格2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地價格2;
/// <summary>
/// Label21 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label21;
/// <summary>
/// txt講師專長 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師專長;
/// <summary>
/// Label12 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label12;
/// <summary>
/// txt場地人數1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地人數1;
/// <summary>
/// Label16 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label16;
/// <summary>
/// txt場地人數2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地人數2;
/// <summary>
/// Label22 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label22;
/// <summary>
/// txt講師學歷 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師學歷;
/// <summary>
/// Label13 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label13;
/// <summary>
/// ddl場地教室類型 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl場地教室類型;
/// <summary>
/// Label20 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label20;
/// <summary>
/// txt講師滿意度1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師滿意度1;
/// <summary>
/// Label23 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label23;
/// <summary>
/// txt講師滿意度2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師滿意度2;
/// <summary>
/// Label14 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label14;
/// <summary>
/// txt場地滿意度1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地滿意度1;
/// <summary>
/// Label17 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label17;
/// <summary>
/// txt場地滿意度2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt場地滿意度2;
/// <summary>
/// btn查詢2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn查詢2;
/// <summary>
/// btn清除2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn清除2;
/// <summary>
/// btn查詢1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn查詢1;
/// <summary>
/// btn清除1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn清除1;
/// <summary>
/// pnl場地 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnl場地;
/// <summary>
/// gv場地 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv場地;
/// <summary>
/// pnl講師 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnl講師;
/// <summary>
/// gv講師 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv講師;
}
}
@@ -0,0 +1,319 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="片語管理.aspx.cs" Inherits="Education.Forms.基本資料.片語管理" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="ds片語Form" runat="server" DataObjectTypeName="Education.片語Item"
TypeName="Education.DAC_片語" OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" InsertMethod="InsertOne" UpdateMethod="UpdateOne" DeleteMethod="DeleteOne">
<SelectParameters>
<asp:ControlParameter ControlID="gv片語" Name="編號"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds片語Grid" runat="server" DataObjectTypeName="Education.片語Item"
TypeName="Education.DAC_片語" OldValuesParameterFormatString="original_{0}"
EnablePaging="true" SelectMethod="SelectPage" SelectCountMethod="SelectCount">
<SelectParameters>
<asp:Parameter Name="noInputReturnAll" Type="Boolean" DefaultValue="true" />
<asp:Parameter Name="orderBy" Type="String" DefaultValue="" />
<asp:ControlParameter Name="適用欄位" Type="String" ControlID="ddl適用欄位_Search" PropertyName="SelectedValue"></asp:ControlParameter>
<asp:ControlParameter Name="片語內容" Type="String" ControlID="txt片語內容_Search" PropertyName="Text"></asp:ControlParameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:LinkButton ID="tab處理" runat="server" CssClass="tabbuttonselected">片語設定</asp:LinkButton>
<asp:LinkButton ID="tab查詢" runat="server" CssClass="tabbutton">查詢</asp:LinkButton>
<div style="border-top: 1px solid gray;">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View處理" runat="server">
<asp:FormView ID="fv片語" runat="server" EnableModelValidation="True" EnableViewState="False"
DataKeyNames="編號,DB_APPNO" DataSourceID="ds片語Form">
<ItemTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
<asp:LinkButton ID="btnUpdate" runat="server" Text="更正" CommandName="Edit" CssClass="button green80" />
<asp:LinkButton ID="btnDelete" runat="server" Text="刪除" CommandName="Delete" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定刪除此筆資料?&quot;);" />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<%-- <tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>--%>
<tr>
<td class="caption">
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb適用欄位" runat="server" Text='<%# Bind("適用欄位") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb片語內容" runat="server" Text='<%# Bind("片語內容") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<InsertItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Insert" CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消新增?&quot;);" />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<%-- <tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb編號" runat="server" Text="(自動編號)" CssClass="inputFull"></asp:Label>
</td>
</tr>--%>
<tr>
<td class="caption">
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:ObjectDataSource ID="ds適用欄位" runat="server"
DataObjectTypeName="WebLib.NameValueItem"
TypeName="Education.DAC_片語"
SelectMethod="Options">
</asp:ObjectDataSource>
<asp:CheckBoxList ID="cbl適用欄位" runat="server"
RepeatLayout="Table"
RepeatDirection="Horizontal"
CellSpacing="3"
RepeatColumns="6"
DataSourceID="ds適用欄位"
DataTextField="Name" DataValueField="Value">
</asp:CheckBoxList>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:TextBox ID="txt片語內容" runat="server" Text='<%# Bind("片語內容") %>' MaxLength="100" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv片語內容" runat="server" ControlToValidate="txt片語內容" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</InsertItemTemplate>
<EditItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Update" CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消更正?&quot;);" />
<asp:HiddenField ID="hfDBAPPNO" runat="server" Value='<%# Bind("DB_APPNO") %>' />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<%-- <tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>--%>
<tr>
<td class="caption">
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:ObjectDataSource ID="ds適用欄位" runat="server"
DataObjectTypeName="WebLib.NameValueItem"
TypeName="Education.DAC_片語"
SelectMethod="Options">
</asp:ObjectDataSource>
<asp:CheckBoxList ID="cbl適用欄位" runat="server"
RepeatLayout="Table"
RepeatDirection="Horizontal"
CellSpacing="3"
RepeatColumns="6"
DataSourceID="ds適用欄位"
DataTextField="Name" DataValueField="Value">
</asp:CheckBoxList>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:TextBox ID="txt片語內容" runat="server" Text='<%# Bind("片語內容") %>' MaxLength="100" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv片語內容" runat="server" ControlToValidate="txt片語內容" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</EditItemTemplate>
<EmptyDataTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<%-- <tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
</tr>--%>
<tr>
<td class="caption" colspan="1">
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
</td>
<td class="datadisplay" colspan="7"></td>
</tr>
<tr>
<td class="caption" colspan="1">
<asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
</td>
<td class="datadisplay" colspan="7"></td>
</tr>
</table>
</EmptyDataTemplate>
</asp:FormView>
<asp:GridView ID="gv片語" runat="server" DataKeyNames="編號"
AllowPaging="True" AutoGenerateColumns="False" EnableModelValidation="True"
EnableViewState="True"
DataSourceID="ds片語Grid">
<Columns>
<%-- <asp:TemplateField HeaderText="編號" SortExpression="編號">
<EditItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Eval("編號", "{0}") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("編號", "{0}") %>'></asp:Label>
<asp:LinkButton ID="LinkButton1" runat="server"
CausesValidation="False" CommandName="Select" Text=""></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="4em" />
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="適用欄位" SortExpression="適用欄位">
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("適用欄位", "{0}") %>'></asp:Label>
<asp:LinkButton ID="LinkButton1" runat="server"
CausesValidation="False" CommandName="Select" Text=""></asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="30em" />
</asp:TemplateField>
<asp:BoundField DataField="片語內容" HeaderText="片語內容" SortExpression="片語內容">
<ItemStyle Width="30em" />
</asp:BoundField>
</Columns>
<PagerTemplate>
<weblib:GridViewPager ID="GridViewPager1" runat="server" />
</PagerTemplate>
</asp:GridView>
</asp:View>
<asp:View ID="View查詢" runat="server">
<div>
<asp:LinkButton ID="btnSearch" runat="server"
CssClass="button blue80" Text="查詢"
OnClick="btnSearch_Click" />
<asp:LinkButton ID="btnClear" runat="server"
CssClass="button red80" Text="清除"
OnClick="btnClear_Click" />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 40px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
</td>
<td class="datainput" colspan="3">
<asp:ObjectDataSource ID="ds適用欄位" runat="server"
DataObjectTypeName="WebLib.NameValueItem"
TypeName="Education.DAC_片語"
SelectMethod="OptionsForSearch">
</asp:ObjectDataSource>
<asp:DropDownList ID="ddl適用欄位_Search" runat="server"
DataSourceID="ds適用欄位" DataTextField="Name" DataValueField="Value">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
</td>
<td class="datainput" colspan="3">
<asp:TextBox ID="txt片語內容_Search" runat="server" Text="" MaxLength="100" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
</table>
<asp:Label ID="lbMessage" runat="server"
CssClass="ErrorMessage"
EnableViewState="False"></asp:Label>
</asp:View>
</asp:MultiView>
</div>
</asp:Content>
@@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "片語管理";
Form_View = fv片語;
Grid_View = gv片語;
FormView_DataSource = ds片語Form;
GridView_DataSource = ds片語Grid;
AddTabButton(MultiView1, 0, tab處理);
AddTabButton(MultiView1, 1, tab查詢);
if (!IsPostBack)
{
ActivateTab(MultiView1, 0);
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
}
if (Form_View.CurrentMode != FormViewMode.ReadOnly)
{
Grid_View.Visible = false;
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Grid_View.PageIndex = 0;
Grid_View.DataBind();
}
protected void btnClear_Click(object sender, EventArgs e)
{
ddl適用欄位_Search.SelectedValue = "";
txt片語內容_Search.Text = "";
}
protected override void GridView_DataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
base.GridView_DataSource_Selected(sender, e);
if (MultiView1.ActiveViewIndex == 1)
{
if (e.ReturnValue is List list && list.Count > 0)
ActivateTab(MultiView1, 0);
else
lbMessage.Text = "找不到合乎條件的資料";
}
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao片語;
}
protected void dsGrid_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao片語;
}
protected string Get適用欄位Value()
{
var Items = FindControl<CheckBoxList>(Form_View, "cbl適用欄位").Items;
var Value = new List<string>();
for (var i = 0; i < Items.Count; i++)
{
var item = Items[i];
if (item.Selected)
Value.Add(item.Value);
}
return string.Join(",", Value.ToArray());
}
protected override void FormView_ItemInserting(object sender, FormViewInsertEventArgs e)
{
base.FormView_ItemInserting(sender, e);
if (e.Values.Contains("適用欄位"))
e.Values["適用欄位"] = Get適用欄位Value();
else
e.Values.Add("適用欄位", Get適用欄位Value());
}
protected override void FormView_ItemUpdating(object sender, FormViewUpdateEventArgs e)
{
base.FormView_ItemUpdating(sender, e);
if (e.NewValues.Contains("適用欄位"))
e.NewValues["適用欄位"] = Get適用欄位Value();
else
e.NewValues.Add("適用欄位", Get適用欄位Value());
}
protected override void FormView_EditDataBound(object sender, EventArgs e)
{
base.FormView_EditDataBound(sender, e);
CheckBoxList cbl適用欄位 = FindControl<CheckBoxList>(Form_View, "cbl適用欄位");
foreach (ListItem item in cbl適用欄位.Items)
{
item.Selected = (Form_View.DataItem as Item)..IndexOf(item.Value) >= 0;
}
}
}
}
@@ -0,0 +1,170 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// ds片語Form 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語Form;
/// <summary>
/// ds片語Grid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語Grid;
/// <summary>
/// tab處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton tab處理;
/// <summary>
/// tab查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton tab查詢;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View處理;
/// <summary>
/// fv片語 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView fv片語;
/// <summary>
/// gv片語 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv片語;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// btnSearch 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnSearch;
/// <summary>
/// btnClear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnClear;
/// <summary>
/// lb適用欄位Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb適用欄位Label;
/// <summary>
/// ds適用欄位 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds適用欄位;
/// <summary>
/// ddl適用欄位_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddl適用欄位_Search;
/// <summary>
/// lb片語內容Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb片語內容Label;
/// <summary>
/// txt片語內容_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt片語內容_Search;
/// <summary>
/// lbMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessage;
}
}
@@ -0,0 +1,507 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master"
AutoEventWireup="true" CodeBehind="課程基本資料.aspx.cs" Inherits="Education.Forms.基本資料.課程基本資料" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<asp:LinkButton ID="tab處理" runat="server" CssClass="tabbuttonselected">處理</asp:LinkButton>
<asp:LinkButton ID="tab查詢" runat="server" CssClass="tabbutton">查詢</asp:LinkButton>
<div style="border-top: 1px solid gray;">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View查詢" runat="server">
<div>
<asp:LinkButton ID="btnSearch" runat="server"
CssClass="button blue80" Text="查詢"
OnClick="btnSearch_Click" />
<asp:LinkButton ID="btnClear" runat="server"
CssClass="button red80" Text="清除"
OnClick="btnClear_Click" />
</div>
<table border="0"
style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 150px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程類別Label3" runat="server" Text="課程類別"></asp:Label>
</td>
<td class="datainput" colspan="1">
<weblib:WDropDownList ID="ddl課程類別_Search" runat="server"
CssClass="inputFull" DataSourceID="dsBCLS"
DataTextField="Name" DataValueField="Value">
</weblib:WDropDownList>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程編號Label3" runat="server" Text="課程編號"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt課程編號_Search" runat="server"
CssClass="inputFull" MaxLength="50" Text=""></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程名稱Label3" runat="server" Text="課程名稱"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt課程名稱_Search" runat="server"
CssClass="inputFull" MaxLength="100" Text=""></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練對象Label3" runat="server" Text="訓練對象"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt訓練對象_Search" runat="server"
CssClass="inputFull" MaxLength="50" Text=""></asp:TextBox>
</td>
</tr>
</table>
<asp:Label ID="lbMessage" runat="server"
CssClass="ErrorMessage"
EnableViewState="False"></asp:Label>
</asp:View>
<asp:View ID="View處理" runat="server">
<asp:ObjectDataSource ID="dsForm" runat="server"
DataObjectTypeName="Education.課程" DeleteMethod="DeleteOne"
InsertMethod="InsertOne"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" TypeName="Education.DAC_課程"
UpdateMethod="UpdateOne"
OnObjectCreating="dsForm_ObjectCreating">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="課程編號"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="dsGrid" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="Select" TypeName="Education.DAC_課程"
OnObjectCreating="dsGrid_ObjectCreating">
<SelectParameters>
<asp:Parameter DefaultValue="true" Name="noInputReturnAll"
Type="Boolean" />
<asp:ControlParameter ControlID="txt課程編號_Search"
Name="課程編號" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="ddl課程類別_Search"
Name="課程類別" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="txt課程名稱_Search"
Name="課程名稱" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txt訓練對象_Search"
Name="訓練對象" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="dsBCLS" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="Get類別資料By大類ForDropDown"
TypeName="Education.DAC_BCLS"
OnObjectCreating="dsBCLS_ObjectCreating">
<SelectParameters>
<asp:Parameter DefaultValue="課程類別" Name="大類"
Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="dsBCLS0" runat="server"
OldValuesParameterFormatString="original_{0}"
OnObjectCreating="dsBCLS_ObjectCreating" SelectMethod="Get類別資料By大類ForDropDown"
TypeName="Education.DAC_BCLS">
<SelectParameters>
<asp:Parameter DefaultValue="課程類型" Name="大類" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:FormView ID="FormView1" runat="server" EnableModelValidation="True"
EnableViewState="False" DataKeyNames="課程編號,課程類別,DB_APPNO"
DataSourceID="dsForm">
<ItemTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New"
CssClass="button blue80" />
<asp:LinkButton ID="btnUpdate" runat="server" Text="更正" CommandName="Edit"
CssClass="button green80" />
<asp:LinkButton ID="btnDelete" runat="server" Text="刪除" CommandName="Delete"
CssClass="button red80" OnClientClick="return confirm(&quot;是否確定刪除此筆資料?&quot;);" />
</div>
<table border="0" class="fixedwithoutborder">
<tr>
<td colspan="1" class="widthcontrol" style="width: 80px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td colspan="1" class="widthcontrol" style="width: 80px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td class="widthcontrol" style="width: 80px;"></td>
<td class="widthcontrol" style="width: 200px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程編號Label" runat="server" Text="課程編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb課程編號" runat="server" CssClass="inputFull"
Text='<%# Bind("課程編號") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課程類別Label" runat="server" Text="課程類別"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb課程類別" runat="server" CssClass="inputFull"
Text='<%# Eval("課程類別") %>'></asp:Label>
<asp:Label ID="lb課程類別0" runat="server" CssClass="inputFull"
Text='<%# Get類別名稱("課程類別", Eval("課程類別")) %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課程類型Label" runat="server" Text="課程類型"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb課程類型" runat="server" CssClass="inputFull"
Text='<%# Get類別名稱("課程類型",Eval("課程類型")) %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程名稱Label" runat="server" Text="課程名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb課程名稱" runat="server" Text='<%# Bind("課程名稱") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練對象Label" runat="server" Text="訓練對象"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb訓練對象" runat="server" Text='<%# Bind("訓練對象") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課程時數Label" runat="server" Text="課程時數"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb課程時數" runat="server" Text='<%# Bind("課程時數") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程內容Label" runat="server" Text="課程內容"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb課程內容" runat="server" Text='<%# Eval("課程內容", "{0}").Replace("\r", "<br/>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb備註" runat="server" Text='<%# Eval("備註", "{0}").Replace("\r", "<br/>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<InsertItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Insert"
CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel"
CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消新增?&quot;);" />
</div>
<table border="0"
style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td class="widthcontrol" style="width: 90px;">&nbsp;</td>
<td class="widthcontrol" style="width: 200px;">&nbsp;</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程編號Label" runat="server" Text="課程編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="Label9" runat="server" Text="(自動編號)"></asp:Label>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb課程類別Label" runat="server"
Text="課程類別"></asp:Label>
</td>
<td class="datainput" colspan="1">
<weblib:WDropDownList ID="ddl課程類別" runat="server" CssClass="inputFull"
DataSourceID="dsBCLS" DataTextField="Name" DataValueField="Value"
SelectedValue='<%# Bind("課程類別") %>'>
</weblib:WDropDownList>
<asp:RequiredFieldValidator ID="rfv課程類別" runat="server"
ControlToValidate="ddl課程類別" Display="Dynamic" ErrorMessage="請選擇"></asp:RequiredFieldValidator>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb課程類型Label" runat="server" Text="課程類型"></asp:Label>
</td>
<td class="datainput">
<weblib:WDropDownList ID="dd課程類型" runat="server" CssClass="inputFull"
DataSourceID="dsBCLS0" DataTextField="Name" DataValueField="Value"
SelectedValue='<%# Bind("課程類型") %>'>
</weblib:WDropDownList>
<asp:RequiredFieldValidator ID="rfv課程類型" runat="server"
ControlToValidate="dd課程類型" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb課程名稱Label"
runat="server" Text="課程名稱"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt課程名稱" runat="server" Text='<%# Bind("課程名稱") %>'
MaxLength="100" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv課程名稱" runat="server" ControlToValidate="txt課程名稱"
Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練對象Label" runat="server" Text="訓練對象"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt訓練對象" runat="server" Text='<%# Bind("訓練對象") %>'
MaxLength="50" CssClass="inputFull"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb課程時數Label" runat="server" Text="課程時數"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt課程時數" runat="server" Text='<%# Bind("課程時數") %>'
MaxLength="20" CssClass="inputFull"></asp:TextBox>
<asp:RangeValidator ID="rv課程時數" runat="server"
ControlToValidate="txt課程時數" Display="Dynamic"
ErrorMessage="請輸入 1 至 100 的數字" MaximumValue="100"
MinimumValue="1" Type="Integer"></asp:RangeValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程內容Label" runat="server" Text="課程內容"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt課程內容" runat="server" Text='<%# Bind("課程內容") %>'
MaxLength="2000" TextMode="MultiLine" Rows="5" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt備註" runat="server" Text='<%# Bind("備註") %>'
MaxLength="1000" TextMode="MultiLine" Rows="5" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
</table>
</InsertItemTemplate>
<EditItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Update"
CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel"
CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消更正?&quot;);" />
</div>
<table border="0" class="fixedwithoutborder">
<tr>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td class="widthcontrol" style="width: 90px;">&nbsp;</td>
<td class="widthcontrol" style="width: 200px;">&nbsp;</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程編號Label" runat="server" Text="課程編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb課程編號" runat="server" CssClass="inputFull"
Text='<%# Bind("課程編號") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課程類別Label" runat="server" Text="課程類別"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb課程類別" runat="server" CssClass="inputFull"
Text='<%# Get類別名稱("課程類別", Eval("課程類別")) %>'></asp:Label>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb課程類型Label" runat="server" Text="課程類型"></asp:Label>
</td>
<td class="datainput">
<weblib:WDropDownList ID="dd課程類型" runat="server" CssClass="inputFull"
DataSourceID="dsBCLS0" DataTextField="Name" DataValueField="Value"
SelectedValue='<%# Bind("課程類型") %>'>
</weblib:WDropDownList>
<asp:RequiredFieldValidator ID="rfv課程類型" runat="server"
ControlToValidate="dd課程類型" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb課程名稱Label"
runat="server" Text="課程名稱"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt課程名稱" runat="server" Text='<%# Bind("課程名稱") %>'
MaxLength="100" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv課程名稱" runat="server" ControlToValidate="txt課程名稱"
Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練對象Label" runat="server" Text="訓練對象"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt訓練對象" runat="server" Text='<%# Bind("訓練對象") %>'
MaxLength="50" CssClass="inputFull"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb課程時數Label" runat="server" Text="課程時數"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt課程時數" runat="server" Text='<%# Bind("課程時數") %>'
MaxLength="20" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv課程時數" runat="server" ControlToValidate="txt課程時數"
Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="rev課程時數" runat="server" ControlToValidate="txt課程時數"
ValidationExpression="\d{1,20}" Display="Dynamic" ErrorMessage="請輸入數字"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程內容Label" runat="server" Text="課程內容"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt課程內容" runat="server" Text='<%# Bind("課程內容") %>'
MaxLength="2000" TextMode="MultiLine" Rows="5" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td class="datainput" colspan="5">
<asp:TextBox ID="txt備註" runat="server" Text='<%# Bind("備註") %>'
MaxLength="1000" TextMode="MultiLine" Rows="5" CssClass="inputFull"></asp:TextBox>
</td>
</tr>
</table>
</EditItemTemplate>
<EmptyDataTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New"
CssClass="button blue80" />
</div>
<table border="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 80px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td colspan="1" class="widthcontrol" style="width: 80px;"></td>
<td colspan="1" class="widthcontrol" style="width: 200px;"></td>
<td class="widthcontrol" style="width: 80px;">&nbsp;</td>
<td class="widthcontrol" style="width: 200px;">&nbsp;</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程類別Label" runat="server" Text="課程類別"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
<td class="caption">
<asp:Label ID="lb課程編號Label" runat="server" Text="課程編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
<td class="caption">
<asp:Label ID="lb課程類型Label" runat="server" Text="課程類型"></asp:Label>
</td>
<td class="datadisplay">&nbsp;</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程名稱Label" runat="server" Text="課程名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="5"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練對象Label" runat="server" Text="訓練對象"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
<td class="caption">
<asp:Label ID="lb課程時數Label" runat="server" Text="課程時數"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程內容Label" runat="server" Text="課程內容"></asp:Label>
</td>
<td class="datadisplay" colspan="5"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td class="datadisplay" colspan="5"></td>
</tr>
</table>
</EmptyDataTemplate>
</asp:FormView>
<asp:GridView ID="GridView1" runat="server"
AllowPaging="True" AutoGenerateColumns="False"
DataKeyNames="課程編號" DataSourceID="dsGrid"
EnableModelValidation="True" Width="100%">
<Columns>
<asp:TemplateField HeaderText="課程編號" SortExpression="課程編號">
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("課程編號") %>'></asp:Label>
<asp:LinkButton ID="LinkButton1" runat="server"
CausesValidation="False" CommandName="Select"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="課程類別" SortExpression="課程類別">
<ItemTemplate>
<asp:Label ID="lb課程類別" runat="server" CssClass="inputFull"
Text='<%# Get類別名稱("課程類別", Eval("課程類別")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="課程類型" SortExpression="課程類型">
<ItemTemplate>
<asp:Label ID="lb課程類型" runat="server" CssClass="inputFull"
Text='<%# Get類別名稱("課程類型",Eval("課程類型")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="課程名稱" HeaderText="課程名稱"
SortExpression="課程名稱" />
<asp:BoundField DataField="訓練對象" HeaderText="訓練對象"
SortExpression="訓練對象" />
<asp:BoundField DataField="課程時數" HeaderText="課程時數"
SortExpression="課程時數" />
</Columns>
<PagerTemplate>
<weblib:GridViewPager ID="GridViewPager1" runat="server" />
</PagerTemplate>
</asp:GridView>
</asp:View>
</asp:MultiView>
</div>
</asp:Content>
@@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "課程基本資料";
Form_View = FormView1;
Grid_View = GridView1;
FormView_DataSource = dsForm;
GridView_DataSource = dsGrid;
AddTabButton(MultiView1, View處理, tab處理);
AddTabButton(MultiView1, View查詢, tab查詢);
if (!IsPostBack)
{
ActivateTab(MultiView1, View處理);
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
}
if (Form_View.CurrentMode != FormViewMode.ReadOnly)
{
Grid_View.Visible = false;
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Grid_View.PageIndex = 0;
Grid_View.DataBind();
}
protected void btnClear_Click(object sender, EventArgs e)
{
txt訓練對象_Search.Text = "";
txt課程名稱_Search.Text = "";
txt課程編號_Search.Text = "";
ddl課程類別_Search.SelectedValue = "";
}
protected override void FormView_InsertDataBound(object sender, EventArgs e)
{
base.FormView_InsertDataBound(sender, e);
FindControl<ITextControl>(Form_View, "txt課程時數").Text = "0";
}
protected override void FormView_ItemDeleting(object sender, FormViewDeleteEventArgs e)
{
base.FormView_ItemDeleting(sender, e);
if (Dao課程.IsOccipued(DAC.GetString(e.Keys["課程編號"])))
{
ClientShowMessage("此課程已經選用過,不可刪除!");
e.Cancel = true;
}
}
protected override void GridView_DataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
base.GridView_DataSource_Selected(sender, e);
if (MultiView1.ActiveViewIndex == 0)
{
if (e.ReturnValue is List list && list.Count > 0)
ActivateTab(MultiView1, View處理);
else
lbMessage.Text = "找不到合乎條件的資料";
}
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao課程;
}
protected void dsGrid_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao課程;
}
protected void dsBCLS_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao類別;
}
}
}
@@ -0,0 +1,215 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// tab處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton tab處理;
/// <summary>
/// tab查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton tab查詢;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// btnSearch 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnSearch;
/// <summary>
/// btnClear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnClear;
/// <summary>
/// lb課程類別Label3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb課程類別Label3;
/// <summary>
/// ddl課程類別_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl課程類別_Search;
/// <summary>
/// lb課程編號Label3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb課程編號Label3;
/// <summary>
/// txt課程編號_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt課程編號_Search;
/// <summary>
/// lb課程名稱Label3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb課程名稱Label3;
/// <summary>
/// txt課程名稱_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt課程名稱_Search;
/// <summary>
/// lb訓練對象Label3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb訓練對象Label3;
/// <summary>
/// txt訓練對象_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt訓練對象_Search;
/// <summary>
/// lbMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessage;
/// <summary>
/// View處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View處理;
/// <summary>
/// dsForm 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsForm;
/// <summary>
/// dsGrid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsGrid;
/// <summary>
/// dsBCLS 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsBCLS;
/// <summary>
/// dsBCLS0 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsBCLS0;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
/// <summary>
/// GridView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView GridView1;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,610 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using WebLib;
using System.Linq;
namespace Education.Forms.
{
public partial class : FormBase
{
private bool fileOK = false;
private int ;
private string ;
private string ;
protected string ;
protected string ;
private bool canExport = false;
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "講師基本資料";
= Server.MapPath(Education.PublicVariable.);
Form_View = FormView1;
Grid_View = GridView1;
FormView_DataSource = dsForm;
GridView_DataSource = dsGrid;
AddTabButton(MultiView1, 0, btnTab1);
AddTabButton(MultiView1, 1, btnTab2);
AddTabButton(MultiView1, 2, btnTab3);
AddTabButton(MultiView1, 3, btnTab4);
RegisterPostbackTrigger(btnExport);
InitJSVar();
GetRights();
if (!IsPostBack)
{
ActivateTab(MultiView1, 0);
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
gv講師外訓滿意度.DataBind();
}
}
protected void GetRights()
{
canExport = new MWEB().CheckRight(ProgramID., WRightName.Execute, UserId);
hfCanExport.Value = (canExport ? "Y" : "");
}
protected string Process授課區域(object o)
{
string[] arr = DAC.GetString(o).Split(',');
string result = "";
foreach (string s in arr)
{
if (s != null && s.Length > 0)
result += Get類別名稱("授課區域", s) + "";
}
if (result.Length > 0)
result = result.Remove(result.Length - 1);
return result;
}
protected override void FormView_DataBinding(object sender, EventArgs e)
{
base.FormView_DataBinding(sender, e);
if (Form_View.CurrentMode == FormViewMode.Insert)
{
//AddPostbackTrigger("UpdatePanel1", Form_View.FindControl("btnSave"));
}
if (Form_View.CurrentMode == FormViewMode.Edit)
{
//AddPostbackTrigger("UpdatePanel1", Form_View.FindControl("btnSave"));
}
}
protected override void FormView_InsertDataBound(object sender, EventArgs e)
{
RegisterPostbackTrigger(Form_View.FindControl("btnSave"));
base.FormView_InsertDataBound(sender, e);
FindControl<DateTextBox>(Form_View, "txt出生日期").Value = new DateTime(1980, 1, 1);
}
protected override void FormView_ReadOnlyDataBound(object sender, EventArgs e)
{
base.FormView_ReadOnlyDataBound(sender, e);
int = 0;
Label lb編號 = FindControl<Label>(Form_View, "lb編號");
if (lb編號 != null)
= DAC.GetInt32(lb編號.Text);
Image image1 = FindControl<Image>(Form_View, "Image1");
if (image1 != null)
{
string[] tmp = image1.ImageUrl.Split('?');
if (tmp.Length > 0 && !File.Exists(Server.MapPath(tmp[0])))
{
image1.ImageUrl = "~/picture/nopicture.jpg";
image1.Attributes.Remove("onclick");
image1.Style.Remove("cursor");
}
else
{
image1.Attributes.Add("onclick", GetOpenWindowJS("../Common/ShowLargePicture.aspx", "_picture", "pic",
String.Format(Education.PublicVariable. + "{0:000000}.jpg", )));
image1.Style.Add("cursor", "pointer");
}
}
System.Data.DataTable 滿 = Dao講師.Select滿意度統計();
if (Form_View.CurrentMode == FormViewMode.ReadOnly)
{
if (滿.Rows.Count > 0)
{
Label lb授課5分 = FindControl<Label>(Form_View, "lb授課5分");
Label lb授課4分 = FindControl<Label>(Form_View, "lb授課4分");
Label lb授課3分 = FindControl<Label>(Form_View, "lb授課3分");
Label lb授課2分 = FindControl<Label>(Form_View, "lb授課2分");
Label lb授課1分 = FindControl<Label>(Form_View, "lb授課1分");
Label lb授課總分 = FindControl<Label>(Form_View, "lb授課總分");
Label lb專業5分 = FindControl<Label>(Form_View, "lb專業5分");
Label lb專業4分 = FindControl<Label>(Form_View, "lb專業4分");
Label lb專業3分 = FindControl<Label>(Form_View, "lb專業3分");
Label lb專業2分 = FindControl<Label>(Form_View, "lb專業2分");
Label lb專業1分 = FindControl<Label>(Form_View, "lb專業1分");
Label lb專業總分 = FindControl<Label>(Form_View, "lb專業總分");
Label lb總分 = FindControl<Label>(Form_View, "lb總分");
if (lb授課5分 != null)
lb授課5分.Text = DAC.GetString(滿.Rows[0]["授課滿意度5"]);
if (lb授課4分 != null)
lb授課4分.Text = DAC.GetString(滿.Rows[0]["授課滿意度4"]);
if (lb授課3分 != null)
lb授課3分.Text = DAC.GetString(滿.Rows[0]["授課滿意度3"]);
if (lb授課2分 != null)
lb授課2分.Text = DAC.GetString(滿.Rows[0]["授課滿意度2"]);
if (lb授課1分 != null)
lb授課1分.Text = DAC.GetString(滿.Rows[0]["授課滿意度1"]);
if (lb授課總分 != null)
lb授課總分.Text = String.Format("{0:##0.00}", 滿.Rows[0]["授課滿意度總分"]);
if (lb專業5分 != null)
lb專業5分.Text = DAC.GetString(滿.Rows[0]["專業滿意度5"]);
if (lb專業4分 != null)
lb專業4分.Text = DAC.GetString(滿.Rows[0]["專業滿意度4"]);
if (lb專業3分 != null)
lb專業3分.Text = DAC.GetString(滿.Rows[0]["專業滿意度3"]);
if (lb專業2分 != null)
lb專業2分.Text = DAC.GetString(滿.Rows[0]["專業滿意度2"]);
if (lb專業1分 != null)
lb專業1分.Text = DAC.GetString(滿.Rows[0]["專業滿意度1"]);
if (lb專業總分 != null)
lb專業總分.Text = String.Format("{0:##0.00}", 滿.Rows[0]["專業滿意度總分"]);
if (lb總分 != null)
lb總分.Text = String.Format("{0:##0.00}", (DAC.GetDouble(滿.Rows[0]["授課滿意度總分"]) + DAC.GetDouble(滿.Rows[0]["專業滿意度總分"])) / 2);
}
System.Data.DataTable = Dao講師.Select講師評鑑統計();
if (.Rows.Count > 0)
{
Label lb講師評鑑_專業度 = FindControl<Label>(Form_View, "lb講師評鑑_專業度");
Label lb講師評鑑_授課技巧 = FindControl<Label>(Form_View, "lb講師評鑑_授課技巧");
Label lb講師評鑑_互動氛圍 = FindControl<Label>(Form_View, "lb講師評鑑_互動氛圍");
Label lb講師評鑑_內容切題 = FindControl<Label>(Form_View, "lb講師評鑑_內容切題");
Label lb講師評鑑_配合度 = FindControl<Label>(Form_View, "lb講師評鑑_配合度");
Label lb講師評鑑_總分 = FindControl<Label>(Form_View, "lb講師評鑑_總分");
Label lb講師評鑑_學員滿意度 = FindControl<Label>(Form_View, "lb講師評鑑_學員滿意度");
if (lb講師評鑑_專業度 != null)
lb講師評鑑_專業度.Text = string.Format("{0:###.00}", .Rows[0]["專業度"]);
if (lb講師評鑑_授課技巧 != null)
lb講師評鑑_授課技巧.Text = string.Format("{0:###.00}", .Rows[0]["授課技巧"]);
if (lb講師評鑑_互動氛圍 != null)
lb講師評鑑_互動氛圍.Text = string.Format("{0:###.00}", .Rows[0]["互動氛圍"]);
if (lb講師評鑑_內容切題 != null)
lb講師評鑑_內容切題.Text = string.Format("{0:###.00}", .Rows[0]["內容切題"]);
if (lb講師評鑑_配合度 != null)
lb講師評鑑_配合度.Text = string.Format("{0:###.00}", .Rows[0]["配合度"]);
if (lb講師評鑑_總分 != null)
lb講師評鑑_總分.Text = string.Format("{0:###.00}", .Rows[0]["總分"]);
if (lb講師評鑑_學員滿意度 != null)
lb講師評鑑_學員滿意度.Text = string.Format("{0:###.00}", .Rows[0]["學員滿意度"]);
}
}
RegisterPostbackTrigger(Form_View.FindControl("btnUploadPhoto"));
}
protected override void FormView_EditDataBound(object sender, EventArgs e)
{
RegisterPostbackTrigger(Form_View.FindControl("btnSave"));
base.FormView_EditDataBound(sender, e);
CheckBoxList cbl授課區域 = FindControl<CheckBoxList>(Form_View, "cbl授課區域");
List<string> s = new List<string>(DAC.GetString((Form_View.DataItem as ).).Split(','));
foreach (ListItem item in cbl授課區域.Items)
{
item.Selected = s.Contains(item.Value);
}
}
protected override void FormView_ItemInserting(object sender, FormViewInsertEventArgs e)
{
base.FormView_ItemInserting(sender, e);
Get授課區域();
}
private void Get授課區域()
{
CheckBoxList cbl授課區域 = FindControl<CheckBoxList>(Form_View, "cbl授課區域");
= "";
foreach (ListItem item in cbl授課區域.Items)
{
if (item.Selected)
+= item.Value + ",";
}
if (.Length > 0)
= .Remove(.Length - 1);
}
protected override void FormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
base.FormView_ItemInserted(sender, e);
//FileUpload fu = Form_View.FindControl("fu照片") as FileUpload;
//儲存照片與縮圖(fu, 新編號);
}
protected override void FormView_ItemUpdating(object sender, FormViewUpdateEventArgs e)
{
base.FormView_ItemUpdating(sender, e);
Get授課區域();
}
protected override void FormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
{
base.FormView_ItemUpdated(sender, e);
//FileUpload fu = Form_View.FindControl("fu照片") as FileUpload;
//儲存照片與縮圖(fu, DAC.GetInt32(e.Keys["編號"]));
}
protected override void FormView_ItemDeleting(object sender, FormViewDeleteEventArgs e)
{
base.FormView_ItemDeleting(sender, e);
if (Dao講師.IsOccipued(DAC.GetInt32(e.Keys["編號"])))
{
e.Cancel = true;
ClientShowMessage("此講師已經選用過,不可刪除!");
}
}
protected override void FormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
base.FormView_ItemDeleted(sender, e);
// 刪除縮圖
string s = String.Format("{0}T_{1:000000}.jpg", , e.Keys["編號"]);
if (File.Exists(s))
File.Delete(s);
}
protected override void FormView_DataSource_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
{
base.FormView_DataSource_Inserting(sender, e);
(e.InputParameters["Value"] as ). = ;
}
protected override void FormView_DataSource_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
base.FormView_DataSource_Inserted(sender, e);
= (e.ReturnValue as ).;
}
protected override void FormView_DataSource_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
base.FormView_DataSource_Updating(sender, e);
(e.InputParameters["Value"] as ). = ;
}
protected override void GridView_DataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
base.GridView_DataSource_Selected(sender, e);
if (MultiView1.ActiveViewIndex == 0)
{
if (e.ReturnValue is List list)
if (list.Count > 0)
lbMessage.Text = "";
else
lbMessage.Text = "找不到合乎條件的資料,請更改條件重新查詢。";
}
}
protected override void GridView_SelectedIndexChanged(object sender, EventArgs e)
{
base.GridView_SelectedIndexChanged(sender, e);
ActivateTab(MultiView1, 1);
}
protected void (FileUpload fu, int )
{
if (fileOK)
{
try
{
string tFullName = String.Format("{0}T_{1:000000}.jpg", , );
MemoryStream ms = PictureProcess.(fu.PostedFile.InputStream, 300, 300);
File.WriteAllBytes(tFullName, ms.ToArray());
ms.Dispose();
tFullName = String.Format("{0}{1:000000}.jpg", , );
ms = PictureProcess.(fu.PostedFile.InputStream, 1200, 1200);
File.WriteAllBytes(tFullName, ms.ToArray());
ms.Dispose();
}
catch
{
throw;
}
}
}
private void ()
{
// 處理上傳照片
string ext = "";
FileUpload fu = FindControl<FileUpload>(Form_View, "fu照片");
if (fu.HasFile && fu.PostedFile.ContentType.ToLower().IndexOf("image") >= 0)
{
// 檢查副檔名
ext = Path.GetExtension(fu.FileName).ToLower();
String[] allowedExt = { ".gif", ".jpeg", ".jpg", ".png" };
for (int i = 0; i < allowedExt.Length; i++)
{
if (ext == allowedExt[i])
{
fileOK = true;
}
}
// 檢查檔案大小
if (fileOK && fu.PostedFile.ContentLength < 5242880)
fileOK = true;
else
fileOK = false;
}
else
{
fileOK = false;
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Grid_View.PageIndex = 0;
Grid_View.DataBind();
}
protected void btnClear_Click(object sender, EventArgs e)
{
lbMessage.Text = "";
txt講師姓名.Text = "";
ddl講師地區.SelectedValue = "";
ddl講師學歷.SelectedValue = "";
// txt講師滿意度1.Text = "";
// txt講師滿意度2.Text = "";
ddl合作狀態_search.SelectedValue = "";
ddl授課專長領域Search.SelectedValue = "";
ddl推薦授課主題Search.SelectedValue = "";
txt關鍵字.Text = "";
txt講師評鑑1.Text = "";
txt講師評鑑2.Text = "";
for (var i = 0; i < cbl關鍵字.Items.Count; i++)
{
cbl關鍵字.Items[i].Selected = true;
}
}
protected void btnInsert_Click(object sender, EventArgs e)
{
ActivateTab(MultiView1, 1);
Form_View.ChangeMode(FormViewMode.Insert);
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao講師;
}
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)
{
if (e.CommandName == "刪除照片")
{
string fileName = String.Format("{0}T_{1:000000}.jpg", , DAC.GetInt32(e.CommandArgument));
if (File.Exists(fileName))
File.Delete(fileName);
fileName = String.Format("{0}{1:000000}.jpg", , DAC.GetInt32(e.CommandArgument));
if (File.Exists(fileName))
File.Delete(fileName);
Form_View.DataBind();
}
if (e.CommandName == "上傳照片")
{
FileUpload fuFile = FindControl<FileUpload>(Form_View, "fu照片");
if (fuFile.HasFile)
{
();
(fuFile, DAC.GetInt32(e.CommandArgument));
Form_View.DataBind();
}
}
if (e.CommandName == "Cancel")
{
if (Form_View.CurrentMode == FormViewMode.Insert)
{
ActivateTab(MultiView1, 0);
}
}
}
protected void cv授課區域_ServerValidate(object source, ServerValidateEventArgs args)
{
Get授課區域();
args.IsValid = .Trim().Length > 0;
}
protected override void FormView_ModeChanged(object sender, EventArgs e)
{
base.FormView_ModeChanged(sender, e);
Grid_View.Visible = true;
}
protected void dsGrid_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["關鍵字欄位"] = Get關鍵字欄位String();
}
private string Get關鍵字欄位String()
{
var = new List<string>();
for (var i = 0; i < cbl關鍵字.Items.Count; i++)
{
if (cbl關鍵字.Items[i].Selected)
.Add(cbl關鍵字.Items[i].Value);
}
return string.Join("|", .ToArray());
}
protected void btnExport_Click(object sender, EventArgs e)
{
if (!canExport)
{
return;
}
var export_columns = new List<string>();
for (var i = 0; i < cblExport.Items.Count; i++)
{
if (cblExport.Items[i].Selected)
export_columns.Add(cblExport.Items[i].Value);
}
var report = new Report.()
{
data = Dao講師.(true, 0, Int32.MaxValue,
txt講師姓名.Text, ddl講師地區.SelectedValue,
ddl授課專長領域Search.SelectedValue, ddl講師學歷.SelectedValue,
0, 0, ddl合作狀態_search.SelectedValue,
txt關鍵字.Text, Get關鍵字欄位String(), ddl推薦授課主題Search.SelectedValue,
DAC.GetInt32(txt講師評鑑1.Text), DAC.GetInt32(txt講師評鑑2.Text)),
export_columns = export_columns
};
MemoryStream ms = report.DoReport();
ResponseWriteStream(ms, String.Format("{0:yyyyMMdd_HHmmss}_講師資料匯出.xlsx", PublicVariable.TaiwanNow));
}
protected void btn講師評鑑查詢_Click(object sender, EventArgs e)
{
gv講師外訓滿意度.PageIndex = 0;
gv講師外訓滿意度.DataBind();
}
protected void btn講師評鑑查詢清除_Click(object sender, EventArgs e)
{
lbMessageEval.Text = "";
txt日期_1_Search.Text = "";
txt日期_2_Search.Text = "";
txt地點_Search.Text = "";
txt人數_1_Search.Text = "";
txt人數_2_Search.Text = "";
txt對象_Search.Text = "";
txt課程名稱_Search.Text = "";
gv講師外訓滿意度.PageIndex = 0;
gv講師外訓滿意度.DataBind();
}
protected void gv講師外訓滿意度_DataBound(object sender, EventArgs e)
{
if (gv講師外訓滿意度.Rows.Count == 0 && gv講師外訓滿意度.PageCount > 0)
{
gv講師外訓滿意度.PageIndex = gv講師外訓滿意度.PageCount - 1;
gv講師外訓滿意度.DataBind();
}
}
protected void ds講師外訓滿意度Grid_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
//if (MultiView1.ActiveViewIndex == 2)
//{
if (e.ReturnValue is 滿List list)
{
var count = list.Count;
if (count == 0)
lbMessageEval.Text = "找不到合乎條件的資料";
else
lbMessageEval.Text = "";
double tot專業度 = 0;
double tot授課技巧 = 0;
double tot互動氛圍 = 0;
double tot內容切題 = 0;
double tot配合度 = 0;
double tot合計 = 0;
double tot學員滿意度 = 0;
foreach (var row in list)
{
tot專業度 += (double)row. ;
tot授課技巧 += (double)row. ;
tot互動氛圍 += (double)row. ;
tot內容切題 += (double)row. ;
tot配合度 += (double)row. ;
tot合計 += (double)row. ;
tot學員滿意度 += (double)row.滿;
}
if (count > 0)
{
avg專業度 = Math.Round(tot專業度 / count, 2);
avg授課技巧 = Math.Round(tot授課技巧 / count, 2);
avg互動氛圍 = Math.Round(tot互動氛圍 / count, 2);
avg內容切題 = Math.Round(tot內容切題 / count, 2);
avg配合度 = Math.Round(tot配合度 / count, 2);
avg合計 = Math.Round(tot合計 / count, 2);
avg學員滿意度 = Math.Round(tot學員滿意度 / count, 2);
}
else
{
avg專業度 = 0;
avg授課技巧 = 0;
avg互動氛圍 = 0;
avg內容切題 = 0;
avg配合度 = 0;
avg合計 = 0;
avg學員滿意度 = 0;
}
}
//}
}
protected double avg專業度, avg授課技巧, avg互動氛圍, avg內容切題, avg配合度, avg合計, avg學員滿意度;
protected void cv身份證字號_ServerValidate(object source, ServerValidateEventArgs args)
{
var = Form_View.DataItem == null ? 0 : DAC.GetInt32((Form_View.DataItem as ).);
args.IsValid = !Dao講師.Is身份證字號Dulicate(, args.Value);
}
protected override void AfterChangeTab()
{
base.AfterChangeTab();
InitJSVar();
}
private void InitJSVar()
{
if (Grid_View.SelectedDataKey != null)
{
var = DAC.GetInt32(Grid_View.SelectedDataKey["編號"]);
var = string.Empty;
var = Dao講師.SelectOne().FirstOrDefault();
if ( != null) = .;
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Init",
$@"V人員類別 = '講師'; V講師編號 = 'T{講師編號:0000}'; V講師姓名 = '{講師姓名}';", true);
}
}
}
}
@@ -0,0 +1,629 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// dsGrid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsGrid;
/// <summary>
/// dsForm 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsForm;
/// <summary>
/// ds學歷 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds學歷;
/// <summary>
/// ds授課區域 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds授課區域;
/// <summary>
/// ds授課區域0 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds授課區域0;
/// <summary>
/// ds片語合作狀態 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語合作狀態;
/// <summary>
/// ds片語合作方式 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語合作方式;
/// <summary>
/// ds片語證照資料 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語證照資料;
/// <summary>
/// ds片語異常標註 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語異常標註;
/// <summary>
/// ds片語講師來源 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語講師來源;
/// <summary>
/// ds片語推薦授課主題 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語推薦授課主題;
/// <summary>
/// ds片語授課專長領域 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語授課專長領域;
/// <summary>
/// ds片語推薦授課主題Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語推薦授課主題Search;
/// <summary>
/// ds片語授課專長領域Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語授課專長領域Search;
/// <summary>
/// ds講師合作狀態 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds講師合作狀態;
/// <summary>
/// btnTab1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab1;
/// <summary>
/// btnTab2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab2;
/// <summary>
/// btnTab3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab3;
/// <summary>
/// btnTab4 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab4;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// Label3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// txt講師姓名 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師姓名;
/// <summary>
/// Label19 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label19;
/// <summary>
/// ddl講師地區 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl講師地區;
/// <summary>
/// Label21 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label21;
/// <summary>
/// ddl授課專長領域Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl授課專長領域Search;
/// <summary>
/// Label22 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label22;
/// <summary>
/// ddl講師學歷 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl講師學歷;
/// <summary>
/// Label11 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label11;
/// <summary>
/// ddl合作狀態_search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl合作狀態_search;
/// <summary>
/// Label13 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label13;
/// <summary>
/// txt講師評鑑1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師評鑑1;
/// <summary>
/// txt講師評鑑2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt講師評鑑2;
/// <summary>
/// Label15 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label15;
/// <summary>
/// ddl推薦授課主題Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.WDropDownList ddl推薦授課主題Search;
/// <summary>
/// Label12 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label12;
/// <summary>
/// txt關鍵字 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt關鍵字;
/// <summary>
/// cbl關鍵字 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBoxList cbl關鍵字;
/// <summary>
/// btnSearch 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnSearch;
/// <summary>
/// btnClear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnClear;
/// <summary>
/// hfCanExport 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfCanExport;
/// <summary>
/// lbMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessage;
/// <summary>
/// btnExport 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnExport;
/// <summary>
/// cblExport 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBoxList cblExport;
/// <summary>
/// GridView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView GridView1;
/// <summary>
/// View處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View處理;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
/// <summary>
/// View講師評鑑 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View講師評鑑;
/// <summary>
/// lb日期Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb日期Label;
/// <summary>
/// txt日期_1_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.DateTextBox txt日期_1_Search;
/// <summary>
/// txt日期_2_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::WebLib.DateTextBox txt日期_2_Search;
/// <summary>
/// lb地點Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb地點Label;
/// <summary>
/// txt地點_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt地點_Search;
/// <summary>
/// lb人數Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb人數Label;
/// <summary>
/// txt人數_1_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt人數_1_Search;
/// <summary>
/// txt人數_2_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt人數_2_Search;
/// <summary>
/// lb對象Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb對象Label;
/// <summary>
/// txt對象_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt對象_Search;
/// <summary>
/// lb課程名稱Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb課程名稱Label;
/// <summary>
/// txt課程名稱_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt課程名稱_Search;
/// <summary>
/// btn講師評鑑查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn講師評鑑查詢;
/// <summary>
/// btn講師評鑑查詢清除 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn講師評鑑查詢清除;
/// <summary>
/// lbMessageEval 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessageEval;
/// <summary>
/// gv講師外訓滿意度 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv講師外訓滿意度;
/// <summary>
/// ds講師外訓滿意度Grid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds講師外訓滿意度Grid;
/// <summary>
/// View付款設定 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View付款設定;
/// <summary>
/// Uc付款設定 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education. Uc付款設定;
}
}
@@ -0,0 +1,139 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="場地遴選View.ascx.cs" Inherits="Education.Forms.檢視UC.場地遴選View"
EnableViewState="false" %>
<table style="table-layout: fixed; width: 100%;">
<tr>
<td class="caption" style="width: 125px">
<asp:Label ID="Label9" runat="server" Text="課程企劃"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb課程企劃" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td></td>
<td class="captionCenter" style="width: 33%">
<asp:Label ID="Label11" runat="server" Text="場地一"></asp:Label>
</td>
<td class="captionCenter" style="width: 33%">
<asp:Label ID="Label12" runat="server" Text="場地二"></asp:Label>
</td>
<td class="captionCenter" style="width: 33%">
<asp:Label ID="Label13" runat="server" Text="場地三"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label16" runat="server" Text="場地編號名稱"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lbPlaceA" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lbPlaceB" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lbPlaceC" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label17" runat="server" Text="安全舒適 30%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt安全舒適A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt安全舒適B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt安全舒適C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label18" runat="server" Text="空間大小 20%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt空間大小A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt空間大小B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt空間大小C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label19" runat="server" Text="價格合理 20%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt價格合理A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt價格合理B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt價格合理C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label20" runat="server" Text="交通便利 20%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt交通便利A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt交通便利B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt交通便利C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label21" runat="server" Text="設備完善 10%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt設備完善A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt設備完善B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="txt設備完善C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label22" runat="server" Text="合計 100%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb合計A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb合計B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb合計C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label23" runat="server" Text="總評"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="txt總評" runat="server" CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label24" runat="server" Text="備註"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="txt備註" runat="server" CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
@@ -0,0 +1,123 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.UC
{
public partial class View : UserControlBase
{
public override void DataBind()
{
base.DataBind();
int ID = DAC.GetInt32();
DAC_場地遴選 Dao場地遴選 = new DAC_場地遴選(ParentPage.conn);
List v1 = Dao訓練課程企劃.SelectOne(ID);
if (v1.Count > 0)
{
lb課程企劃.Text = String.Format("[{0}] {1}", v1[0]., v1[0].);
}
lbPlaceA.Text = "(尚未選擇)";
lbPlaceB.Text = "(尚未選擇)";
lbPlaceC.Text = "(尚未選擇)";
txt安全舒適A.Text = "";
txt空間大小A.Text = "";
txt價格合理A.Text = "";
txt交通便利A.Text = "";
txt設備完善A.Text = "";
lb合計A.Text = "";
txt安全舒適B.Text = "";
txt空間大小B.Text = "";
txt價格合理B.Text = "";
txt交通便利B.Text = "";
txt設備完善B.Text = "";
lb合計B.Text = "";
txt安全舒適B.Text = "";
txt空間大小B.Text = "";
txt價格合理B.Text = "";
txt交通便利B.Text = "";
txt設備完善B.Text = "";
lb合計B.Text = "";
txt總評.Text = "";
txt備註.Text = "";
List = Dao場地遴選.SelectOne(ID);
if (.Count > 0)
{
if ([0]._A > 0)
{
lbPlaceA.Text = String.Format("[{0:0000}] {1}", [0]._A, Get場地名稱([0]._A));
txt安全舒適A.Text = [0]._A.ToString();
txt空間大小A.Text = [0]._A.ToString();
txt價格合理A.Text = [0]._A.ToString();
txt交通便利A.Text = [0].便_A.ToString();
txt設備完善A.Text = [0]._A.ToString();
lb合計A.Text = [0]._A.ToString();
}
else if (!String.IsNullOrEmpty([0]._A))
{
lbPlaceA.Text = [0]._A;
txt安全舒適A.Text = [0]._A.ToString();
txt空間大小A.Text = [0]._A.ToString();
txt價格合理A.Text = [0]._A.ToString();
txt交通便利A.Text = [0].便_A.ToString();
txt設備完善A.Text = [0]._A.ToString();
lb合計A.Text = [0]._A.ToString();
}
if ([0]._B > 0)
{
lbPlaceB.Text = String.Format("[{0:0000}] {1}", [0]._B, Get場地名稱([0]._B));
txt安全舒適B.Text = [0]._B.ToString();
txt空間大小B.Text = [0]._B.ToString();
txt價格合理B.Text = [0]._B.ToString();
txt交通便利B.Text = [0].便_B.ToString();
txt設備完善B.Text = [0]._B.ToString();
lb合計B.Text = [0]._B.ToString();
}
else if (!String.IsNullOrEmpty([0]._B))
{
lbPlaceB.Text = [0]._B;
txt安全舒適B.Text = [0]._B.ToString();
txt空間大小B.Text = [0]._B.ToString();
txt價格合理B.Text = [0]._B.ToString();
txt交通便利B.Text = [0].便_B.ToString();
txt設備完善B.Text = [0]._B.ToString();
lb合計B.Text = [0]._B.ToString();
}
if ([0]._C > 0)
{
lbPlaceC.Text = String.Format("[{0:0000}] {1}", [0]._C, Get場地名稱([0]._C));
txt安全舒適C.Text = [0]._C.ToString();
txt空間大小C.Text = [0]._C.ToString();
txt價格合理C.Text = [0]._C.ToString();
txt交通便利C.Text = [0].便_C.ToString();
txt設備完善C.Text = [0]._C.ToString();
lb合計C.Text = [0]._C.ToString();
}
else if (!String.IsNullOrEmpty([0]._C))
{
lbPlaceC.Text = [0]._C;
txt安全舒適C.Text = [0]._C.ToString();
txt空間大小C.Text = [0]._C.ToString();
txt價格合理C.Text = [0]._C.ToString();
txt交通便利C.Text = [0].便_C.ToString();
txt設備完善C.Text = [0]._C.ToString();
lb合計C.Text = [0]._C.ToString();
}
txt總評.Text = [0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
txt備註.Text = [0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
}
}
}
}
@@ -0,0 +1,350 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class View
{
/// <summary>
/// Label9 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label9;
/// <summary>
/// lb課程企劃 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb課程企劃;
/// <summary>
/// Label11 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label11;
/// <summary>
/// Label12 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label12;
/// <summary>
/// Label13 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label13;
/// <summary>
/// Label16 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label16;
/// <summary>
/// lbPlaceA 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbPlaceA;
/// <summary>
/// lbPlaceB 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbPlaceB;
/// <summary>
/// lbPlaceC 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbPlaceC;
/// <summary>
/// Label17 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label17;
/// <summary>
/// txt安全舒適A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt安全舒適A;
/// <summary>
/// txt安全舒適B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt安全舒適B;
/// <summary>
/// txt安全舒適C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt安全舒適C;
/// <summary>
/// Label18 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label18;
/// <summary>
/// txt空間大小A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt空間大小A;
/// <summary>
/// txt空間大小B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt空間大小B;
/// <summary>
/// txt空間大小C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt空間大小C;
/// <summary>
/// Label19 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label19;
/// <summary>
/// txt價格合理A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt價格合理A;
/// <summary>
/// txt價格合理B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt價格合理B;
/// <summary>
/// txt價格合理C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt價格合理C;
/// <summary>
/// Label20 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label20;
/// <summary>
/// txt交通便利A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt交通便利A;
/// <summary>
/// txt交通便利B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt交通便利B;
/// <summary>
/// txt交通便利C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt交通便利C;
/// <summary>
/// Label21 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label21;
/// <summary>
/// txt設備完善A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt設備完善A;
/// <summary>
/// txt設備完善B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt設備完善B;
/// <summary>
/// txt設備完善C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt設備完善C;
/// <summary>
/// Label22 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label22;
/// <summary>
/// lb合計A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb合計A;
/// <summary>
/// lb合計B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb合計B;
/// <summary>
/// lb合計C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb合計C;
/// <summary>
/// Label23 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label23;
/// <summary>
/// txt總評 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt總評;
/// <summary>
/// Label24 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label24;
/// <summary>
/// txt備註 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt備註;
}
}
@@ -0,0 +1,253 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="教學日誌暨異常狀況View.ascx.cs"
Inherits="Education.Forms.檢視UC.教學日誌暨異常狀況View" EnableViewState="false" %>
<%@ Import Namespace="Education" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:ObjectDataSource ID="ds教學日誌" runat="server" DataObjectTypeName="Education.教學日誌"
OldValuesParameterFormatString="original_{0}" SelectMethod="SelectOne" TypeName="Education.DAC_教學日誌"
OnObjectCreating="ds教學日誌_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="課程企劃編號" Type="Int32" />
<asp:Parameter Name="課程序號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:FormView ID="FormView1" runat="server" DataKeyNames="課程企劃編號,課程序號" DataSourceID="ds教學日誌"
EnableModelValidation="True" OnDataBound="FormView1_DataBound">
<ItemTemplate>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 275px;"></td>
<td colspan="1" class="widthcontrol" style="width: 190px;"></td>
<td colspan="1" class="widthcontrol" style="width: 110px;"></td>
<td colspan="1" class="widthcontrol" style="width: 190px;"></td>
<td colspan="1" class="widthcontrol" style="width: 110px;"></td>
<td colspan="1" class="widthcontrol" style="width: 190px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb課程企劃編號Label" runat="server" Text="課程企劃編號"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb課程企劃編號" runat="server" CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課程序號Label" runat="server" Text="節次"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb節次" runat="server" CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb講師Label" runat="server" Text="講師"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb講師" runat="server" CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb應到人數Label" runat="server" Text="應到人數"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb應到人數" runat="server" Text='<%# Bind("應到人數") %>' CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb實到人數Label" runat="server" Text="實到人數"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb實到人數" runat="server" Text='<%# Bind("實到人數") %>' CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb缺席人數Label" runat="server" Text="缺席人數"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb缺席人數" runat="server" Text='<%# Bind("缺席人數") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb教學概要Label" runat="server" Text="教學概要"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb教學概要" runat="server" Text='<%# Eval("教學概要", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>' CssClass="inputFull"></asp:Label>
<div style="color:#888; font-size:12px; padding:4px 0;">※ 2026年起改填寫課程執行觀察</div>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb學員反應Label" runat="server" Text="學員反應"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb學員反應" runat="server" Text='<%# Eval("學員反應", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>' CssClass="inputFull"></asp:Label>
<div style="color:#888; font-size:12px; padding:4px 0;">※ 2026年起改填寫課程執行觀察</div>
</td>
</tr>
<tr>
<td colspan="6" style="background-color:#e8f0fe; font-weight:bold; padding:6px 8px;">
課程執行觀察
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察01Label" runat="server" Text="1.課程是否依原訂計畫執行"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察01" runat="server" Text='<%# DAC_教學日誌選項.Get觀察01名稱(Eval("課程執行觀察_01")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察02Label" runat="server" Text="2.課程進度"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察02" runat="server" Text='<%# DAC_教學日誌選項.Get觀察02名稱(Eval("課程執行觀察_02")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察03Label" runat="server" Text="3.講師授課情形"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察03" runat="server" Text='<%# DAC_教學日誌選項.Get觀察03名稱(Eval("課程執行觀察_03")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察04Label" runat="server" Text="4.學員參與互動"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察04" runat="server" Text='<%# DAC_教學日誌選項.Get觀察04名稱(Eval("課程執行觀察_04")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察05Label" runat="server" Text="5.學員學習投入"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察05" runat="server" Text='<%# DAC_教學日誌選項.Get觀察05名稱(Eval("課程執行觀察_05")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察06Label" runat="server" Text="6.學員課堂回應情形"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察06" runat="server" Text='<%# DAC_教學日誌選項.Get觀察06名稱(Eval("課程執行觀察_06")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察07Label" runat="server" Text="7.實作/活動完成情形"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察07" runat="server" Text='<%# DAC_教學日誌選項.Get觀察07名稱(Eval("課程執行觀察_07")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察08Label" runat="server" Text="8.教學設備及場地"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察08" runat="server" Text='<%# DAC_教學日誌選項.Get觀察08名稱(Eval("課程執行觀察_08")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察說明Label" runat="server" Text="觀察說明"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察說明" runat="server" Text='<%# Eval("課程執行觀察說明_01", "{0}").Replace("\r", "<br/>") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td colspan="6" style="background-color:#e8f0fe; font-weight:bold; padding:6px 8px;">
課程觀察紀錄
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察紀錄1Label" runat="server" Text="1.本次課程值得保留或表現良好之處"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察紀錄1" runat="server" Text='<%# Eval("課程觀察紀錄_1", "{0}").Replace("\r", "<br/>") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb觀察紀錄2Label" runat="server" Text="2.本次課程可改善事項及建議"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb觀察紀錄2" runat="server" Text='<%# Eval("課程觀察紀錄_2", "{0}").Replace("\r", "<br/>") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td colspan="6" style="background-color:#e8f0fe; font-weight:bold; padding:6px 8px;">
異常狀況紀錄
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb異常情形Label" runat="server" Text="異常情形"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb有無異常" runat="server" Text='<%# DAC_教學日誌選項.Get有無異常事項名稱(Eval("有無異常事項")) %>' CssClass="inputFull"></asp:Label>
<asp:Label ID="lb異常情形" runat="server" Text='<%# Eval("異常情形", "{0}").Replace("\r", "<br/>") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb處理經過與結果Label" runat="server" Text="處理過程及建議"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb處理經過與結果" runat="server" Text='<%# Eval("處理經過與結果", "{0}").Replace("\r", "<br/>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb是否需後續追蹤Label" runat="server" Text="是否需後續追蹤"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb是否需後續追蹤" runat="server" Text='<%# DAC_教學日誌選項.Get是否需後續追蹤名稱(Eval("是否需後續追蹤")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb追蹤事項Label" runat="server" Text="追蹤事項"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb追蹤事項" runat="server" Text='<%# Eval("追蹤事項", "{0}").Replace("\r", "<br/>") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption" style="vertical-align:top">
<asp:Label ID="lb處理結果追蹤Label" runat="server" Text="處理結果追蹤"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb處理結果追蹤" runat="server" Text='<%# Eval("處理結果追蹤", "{0}").Replace("\r", "<br/>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表人員Label" runat="server" Text="填表人員"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb填表人員0" runat="server" CssClass="inputFull" Text='<%# Get員工姓名(Eval("填表人員")) %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表日期Label" runat="server" Text="填表日期"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb填表日期" runat="server" CssClass="inputFull" Text='<%# Eval("填表日期", "{0:yyyy-MM-dd}") %>'></asp:Label>
</td>
<td></td>
<td></td>
</tr>
</table>
</ItemTemplate>
<EmptyDataTemplate>
<asp:Label ID="lbNoData" runat="server" CssClass="ErrorMessage" Text="此節次尚無教學日誌資料"></asp:Label>
</EmptyDataTemplate>
</asp:FormView>
@@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.UC
{
public partial class View : UserControlBase
{
private int = 0;
private int = 0;
public override void DataBind()
{
base.DataBind();
string[] keyArr = .Split('|');
if (keyArr.Length > 0)
= DAC.GetInt32(keyArr[0]);
if (keyArr.Length > 1)
= DAC.GetInt32(keyArr[1]);
ds教學日誌.SelectParameters["課程企劃編號"].DefaultValue = .ToString();
ds教學日誌.SelectParameters["課程序號"].DefaultValue = .ToString();
FormView1.DataBind();
}
protected void ds教學日誌_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = new DAC_教學日誌(ParentPage.conn);
}
protected void FormView1_DataBound(object sender, EventArgs e)
{
if (FormView1.DataItem == null)
return;
List d1 = Dao訓練課程企劃.SelectOne();
if (d1.Count > 0)
{
var ctl = FindControl<ITextControl>(FormView1, "lb課程企劃編號");
if (ctl != null)
ctl.Text = d1[0].;
}
DAC_訓練課程內容 Dao訓練課程內容 = new DAC_訓練課程內容(ParentPage.conn);
List d2 = Dao訓練課程內容.SelectOne(, );
if (d2.Count > 0)
{
var ctl1 = FindControl<ITextControl>(FormView1, "lb節次");
var ctl2 = FindControl<ITextControl>(FormView1, "lb講師");
if (ctl1 != null)
ctl1.Text = d2[0]..ToString();
if (ctl2 != null)
ctl2.Text = Dao訓練課程企劃.Select選定講師名稱(, );
}
string[] ID = { "lb觀察01", "lb觀察02", "lb觀察03", "lb觀察04", "lb觀察05", "lb觀察06", "lb觀察07", "lb觀察08", "lb觀察說明", "lb觀察紀錄1", "lb觀察紀錄2" };
foreach (string ID in ID)
{
Label lb = FindControl<Label>(FormView1, ID);
if (lb != null && string.IsNullOrEmpty(lb.Text.Trim()))
{
lb.Text = "2026年新增欄位";
lb.ForeColor = System.Drawing.Color.Gray;
}
}
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class View
{
/// <summary>
/// ds教學日誌 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds教學日誌;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
}
}
@@ -0,0 +1,112 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="教材遴選View.ascx.cs" Inherits="Education.Forms.檢視UC.教材遴選View"
EnableViewState="false" %>
<table style="table-layout: fixed; width: 100%;">
<tr>
<td style="width: 145px">&nbsp;</td>
<td class="captionCenter" colspan="1" style="width: 33%">教材一</td>
<td class="captionCenter" colspan="1" style="width: 33%">教材二</td>
<td class="captionCenter" colspan="1" style="width: 33%">教材三</td>
</tr>
<tr>
<td class="caption">教材名稱</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb教材一" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb教材二" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb教材三" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">與本課程之訓練目標相符</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb訓練目標相符A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb訓練目標相符B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb訓練目標相符C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">符合參訓對象之程度、需求及特性</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb參訓對象符合A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb參訓對象符合B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb參訓對象符合C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">與課程大綱、授課內容或學習活動相符</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb課程大綱相符A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb課程大綱相符B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb課程大綱相符C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">內容正確、適切,相關資訊具時效性</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb內容正確適切A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb內容正確適切B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb內容正確適切C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">有助於學員理解、學習或實際工作應用</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb學員理解應用A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb學員理解應用B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb學員理解應用C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">使用方式、操作流程或內容呈現清楚</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb使用方式清楚A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb使用方式清楚B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb使用方式清楚C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">評選結果</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb評選結果A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb評選結果B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb評選結果C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">備註</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb備註" runat="server" CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
@@ -0,0 +1,115 @@
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.UC
{
public partial class View : UserControlBase
{
public override void DataBind()
{
base.DataBind();
int ID = 0;
int = 0;
if ( == null)
return;
string[] keyArr = .Split('|');
if (keyArr.Length > 0)
ID = DAC.GetInt32(keyArr[0]);
if (keyArr.Length > 1)
= DAC.GetInt32(keyArr[1]);
DAC_教材遴選 Dao教材遴選 = new DAC_教材遴選(ParentPage.conn);
List v3 = Dao教材遴選.SelectOne(ID, );
lb教材一.Text = "";
lb教材二.Text = "";
lb教材三.Text = "";
foreach (string in new[] { "A", "B", "C" })
{
(, "", "", "", "", "", "", "");
}
lb備註.Text = "";
if (v3.Count > 0)
{
if (!String.IsNullOrEmpty(v3[0]._A))
{
lb教材一.Text = v3[0]._A;
("A", v3[0]._A, v3[0]._A, v3[0]._A, v3[0]._A, v3[0]._A, v3[0].使_A, v3[0]._A);
}
if (!String.IsNullOrEmpty(v3[0]._B))
{
lb教材二.Text = v3[0]._B;
("B", v3[0]._B, v3[0]._B, v3[0]._B, v3[0]._B, v3[0]._B, v3[0].使_B, v3[0]._B);
}
if (!String.IsNullOrEmpty(v3[0]._C))
{
lb教材三.Text = v3[0]._C;
("C", v3[0]._C, v3[0]._C, v3[0]._C, v3[0]._C, v3[0]._C, v3[0].使_C, v3[0]._C);
}
lb備註.Text = v3[0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
}
}
private void (string , string , string , string , string , string , string 使, string )
{
Label = ("lb訓練目標相符" + );
Label = ("lb參訓對象符合" + );
Label = ("lb課程大綱相符" + );
Label = ("lb內容正確適切" + );
Label = ("lb學員理解應用" + );
Label = ("lb使用方式清楚" + );
Label = ("lb評選結果" + );
if ( != null) .Text = DAC_教材評選選項.Get評選項目名稱();
if ( != null) .Text = DAC_教材評選選項.Get評選項目名稱();
if ( != null) .Text = DAC_教材評選選項.Get評選項目名稱();
if ( != null) .Text = DAC_教材評選選項.Get評選項目名稱();
if ( != null) .Text = DAC_教材評選選項.Get評選項目名稱();
if ( != null) .Text = DAC_教材評選選項.Get評選項目名稱(使);
if ( != null) .Text = DAC_教材評選選項.Get評選結果名稱();
}
private Label (string id)
{
switch (id)
{
case "lb訓練目標相符A": return lb訓練目標相符A;
case "lb訓練目標相符B": return lb訓練目標相符B;
case "lb訓練目標相符C": return lb訓練目標相符C;
case "lb參訓對象符合A": return lb參訓對象符合A;
case "lb參訓對象符合B": return lb參訓對象符合B;
case "lb參訓對象符合C": return lb參訓對象符合C;
case "lb課程大綱相符A": return lb課程大綱相符A;
case "lb課程大綱相符B": return lb課程大綱相符B;
case "lb課程大綱相符C": return lb課程大綱相符C;
case "lb內容正確適切A": return lb內容正確適切A;
case "lb內容正確適切B": return lb內容正確適切B;
case "lb內容正確適切C": return lb內容正確適切C;
case "lb學員理解應用A": return lb學員理解應用A;
case "lb學員理解應用B": return lb學員理解應用B;
case "lb學員理解應用C": return lb學員理解應用C;
case "lb使用方式清楚A": return lb使用方式清楚A;
case "lb使用方式清楚B": return lb使用方式清楚B;
case "lb使用方式清楚C": return lb使用方式清楚C;
case "lb評選結果A": return lb評選結果A;
case "lb評選結果B": return lb評選結果B;
case "lb評選結果C": return lb評選結果C;
default: return null;
}
}
}
}
@@ -0,0 +1,142 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class View
{
/// <summary>
/// lb教材一 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb教材一;
/// <summary>
/// lb教材二 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb教材二;
/// <summary>
/// lb教材三 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb教材三;
/// <summary>
/// lb訓練目標相符A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb訓練目標相符A;
/// <summary>
/// lb訓練目標相符B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb訓練目標相符B;
/// <summary>
/// lb訓練目標相符C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb訓練目標相符C;
/// <summary>
/// lb參訓對象符合A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb參訓對象符合A;
/// <summary>
/// lb參訓對象符合B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb參訓對象符合B;
/// <summary>
/// lb參訓對象符合C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb參訓對象符合C;
/// <summary>
/// lb課程大綱相符A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb課程大綱相符A;
/// <summary>
/// lb課程大綱相符B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb課程大綱相符B;
/// <summary>
/// lb課程大綱相符C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb課程大綱相符C;
/// <summary>
/// lb內容正確適切A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb內容正確適切A;
/// <summary>
/// lb內容正確適切B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb內容正確適切B;
/// <summary>
/// lb內容正確適切C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb內容正確適切C;
/// <summary>
/// lb學員理解應用A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb學員理解應用A;
/// <summary>
/// lb學員理解應用B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb學員理解應用B;
/// <summary>
/// lb學員理解應用C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb學員理解應用C;
/// <summary>
/// lb使用方式清楚A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb使用方式清楚A;
/// <summary>
/// lb使用方式清楚B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb使用方式清楚B;
/// <summary>
/// lb使用方式清楚C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb使用方式清楚C;
/// <summary>
/// lb評選結果A 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb評選結果A;
/// <summary>
/// lb評選結果B 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb評選結果B;
/// <summary>
/// lb評選結果C 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb評選結果C;
/// <summary>
/// lb備註 控制項。
/// </summary>
protected global::System.Web.UI.WebControls.Label lb備註;
}
}
@@ -0,0 +1,198 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="教育訓練效益追蹤調查表View.ascx.cs"
Inherits="Education.Forms.檢視UC.教育訓練效益追蹤調查表View" EnableViewState="false" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:ObjectDataSource ID="ds調查表Form" runat="server"
OnObjectCreating="ds調查表Form_ObjectCreating"
DataObjectTypeName="Education.訓練效益" DeleteMethod="DeleteOne"
InsertMethod="InsertOne" OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" TypeName="Education.DAC_訓練效益" UpdateMethod="UpdateOne">
<SelectParameters>
<asp:Parameter Name="訓練課程企劃編號" Type="Int32" />
<asp:Parameter Name="填表序號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds站別" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectForDropDown" TypeName="Education.DAC_站別"></asp:ObjectDataSource>
<asp:FormView ID="FormView1" runat="server" DataKeyNames="訓練課程企劃編號,填表序號,DB_APPNO"
DataSourceID="ds調查表Form" EnableModelValidation="True">
<ItemTemplate>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 110px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表序號Label" runat="server" Text="填表序號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb填表序號" runat="server" Text='<%# Bind("填表序號") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表人Label" runat="server" Text="填表人"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb填表人" runat="server" Text='<%# Bind("填表人") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表日期Label" runat="server" Text="填表日期"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb填表日期" runat="server" Text='<%# Eval("填表日期", "{0:yyyy-MM-dd}") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表人站別Label" runat="server" Text="填表人站別"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb填表人站別" runat="server" Text='<%# Get站別(Eval("填表人站別")) %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表人職稱Label" runat="server" Text="填表人職稱"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb填表人職稱" runat="server" Text='<%# Bind("填表人職稱") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="captionLeft" colspan="8">
<asp:Label ID="Label10" runat="server" Text="一、目前於執行工作上,你期待本計畫人員需加強的地方與原因為何?"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb問題1_1Label" runat="server" Text="加強地方"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb問題1_1" runat="server" CssClass="inputFull"
Text='<%# Bind("問題1_1") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb問題1_2Label" runat="server" Text="原因"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb問題1_2" runat="server" Text='<%# Bind("問題1_2") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="captionLeft" colspan="8">
<asp:Label ID="Label11" runat="server" Text="二、請問您認為未來開辦哪方面訓練課程較為適合?"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb問題2_1_1Label" runat="server" Text="1. 課程名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb問題2_1_1" runat="server" CssClass="inputFull"
Text='<%# Bind("問題2_1_1") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb問題2_1_2Label" runat="server" Text="推薦講師"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb問題2_1_2" runat="server" CssClass="inputFull"
Text='<%# Bind("問題2_1_2") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb問題2_1_3Label" runat="server" Text="原因"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb問題2_1_3" runat="server" Text='<%# Bind("問題2_1_3") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb問題2_2_1Label" runat="server" Text="2. 課程名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb問題2_2_1" runat="server" Text='<%# Bind("問題2_2_1") %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb問題2_2_2Label" runat="server" Text="推薦講師"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb問題2_2_2" runat="server" Text='<%# Bind("問題2_2_2") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb問題2_2_3Label" runat="server" Text="原因"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb問題2_2_3" runat="server" Text='<%# Bind("問題2_2_3") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="captionLeft" colspan="8">
<asp:Label ID="Label12" runat="server" Text="三、對於課程的規畫或相關事宜,您是否有其他建議?"></asp:Label>
</td>
</tr>
<tr>
<td class="datadisplay" colspan="8">
<asp:Label ID="lb問題3_1" runat="server" Text='<%# Eval("問題3_1", "{0}").Replace("\r", "<br/>") %>'
CssClass="inputFull"></asp:Label>&nbsp;
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="ds效益追蹤個人" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="SelectFor簽核"
TypeName="Education.DAC_訓練效益個人" OnObjectCreating="ds效益追蹤個人_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="訓練課程企劃編號" Type="Int32" />
<asp:Parameter Name="填表序號" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView ID="gv訓練效益個人" runat="server" DataSourceID="ds效益追蹤個人"
EnableModelValidation="True" AutoGenerateColumns="False" Width="100%">
<Columns>
<asp:BoundField DataField="學員編號" HeaderText="學員編號">
<HeaderStyle Width="6em" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="學員姓名" HeaderText="學員姓名">
<HeaderStyle Width="6em" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="職務名稱" HeaderText="職務">
<HeaderStyle Width="8em" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField HeaderText="是否有成效">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("是否有成效", "{0}") == "Y" ? "是" : Eval("是否有成效", "{0}") == "N" ? "否" : "未填寫" %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="6em" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="成效說明" HeaderText="成效說明">
<ItemStyle HorizontalAlign="NotSet" />
</asp:BoundField>
</Columns>
</asp:GridView>
@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.UC
{
public partial class 調View : UserControlBase
{
private DAC_訓練效益 Dao訓練效益;
private DAC_訓練效益個人 Dao訓練效益個人;
private int = 0;
private int = 0;
public override void DataBind()
{
base.DataBind();
Dao訓練效益 = new DAC_訓練效益(ParentPage.conn);
Dao訓練效益個人 = new DAC_訓練效益個人(ParentPage.conn);
string[] keyArr = .Split('|');
if (keyArr.Length > 0)
= DAC.GetInt32(keyArr[0]);
if (keyArr.Length > 1)
= DAC.GetInt32(keyArr[1]);
ds調查表Form.SelectParameters["訓練課程企劃編號"].DefaultValue = .ToString();
ds調查表Form.SelectParameters["填表序號"].DefaultValue = .ToString();
FormView1.DataBind();
ds效益追蹤個人.SelectParameters["訓練課程企劃編號"].DefaultValue = .ToString();
ds效益追蹤個人.SelectParameters["填表序號"].DefaultValue = .ToString();
gv訓練效益個人.DataBind();
}
protected string Get站別(object )
{
NameValueList data = ds站別.Select() as NameValueList;
return data.GetName();
}
protected void ds調查表Form_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練效益;
}
protected void ds效益追蹤個人_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練效益個人;
}
}
}
@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class 調View
{
/// <summary>
/// ds調查表Form 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds調查表Form;
/// <summary>
/// ds站別 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds站別;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
/// <summary>
/// ds效益追蹤個人 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds效益追蹤個人;
/// <summary>
/// gv訓練效益個人 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv訓練效益個人;
}
}
@@ -0,0 +1,101 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="滿意度分析View.ascx.cs" Inherits="Education.Forms.檢視UC.滿意度分析View"
EnableViewState="false" %>
<style type="text/css">
td.diaplay1 {
vertical-align: middle;
text-align: center;
border: 1px solid #999999;
}
</style>
<asp:ObjectDataSource ID="ds課程內容" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="SelectBy課程企劃"
TypeName="Education.DAC_訓練課程內容"
OnSelecting="ds課程內容_Selecting">
<SelectParameters>
<asp:Parameter Name="訓練課程企劃編號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:DataList ID="dl課程內容" runat="server" DataSourceID="ds課程內容" OnItemDataBound="dl課程內容_ItemDataBound">
<ItemTemplate>
<asp:HiddenField ID="hf訓練課程企劃編號" runat="server" Value='<%# Eval("訓練課程企劃編號") %>' />
<asp:HiddenField ID="hf課程序號" runat="server" Value='<%# Eval("課程序號") %>' />
<asp:ObjectDataSource ID="ds滿意度分析" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="Select滿意度分析"
TypeName="Education.DAC_滿意度調查">
<SelectParameters>
<asp:Parameter Name="訓練課程企劃編號" Type="Int32" />
<asp:Parameter Name="課程序號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<div style="margin-top: 20px;">
<asp:Label ID="lb課程" runat="server" Font-Bold="true"
Text='<%# String.Format("{0}.{1}", Eval("節次"), Eval("課程名稱")) %>'></asp:Label>
</div>
<div style="margin-left: 20px;">
<asp:DataList ID="dl滿意度分析" runat="server">
<ItemTemplate>
<div style="margin-top: 10px; margin-bottom: 10px;">
<asp:Label ID="lb題目" runat="server"
Text='<%# Eval("題目") %>'></asp:Label>
</div>
<table border="1" class="fixedwithborder" style="border-collapse: collapse;">
<tr>
<th style="width: 80px"></th>
<th style="width: 80px">非常滿意</th>
<th style="width: 80px">滿意</th>
<th style="width: 80px">普通</th>
<th style="width: 80px">不滿意</th>
<th style="width: 80px">非常不滿意</th>
<th style="width: 80px">合計</th>
<th style="width: 80px">分數</th>
</tr>
<tr>
<th>填答數</th>
<td class="diaplay1">
<asp:Label ID="lb五分" runat="server" Text='<%# Eval("五分", "{0}") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb四分" runat="server" Text='<%# Eval("四分", "{0}") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb三分" runat="server" Text='<%# Eval("三分", "{0}") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb二分" runat="server" Text='<%# Eval("二分", "{0}") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb一分" runat="server" Text='<%# Eval("一分", "{0}") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb合計" runat="server" Text='<%# Eval("填答數", "{0}") %>'></asp:Label>
</td>
<td class="diaplay1" rowspan="2">
<asp:Label ID="lb分數" runat="server" Text='<%# Eval("分數", "{0:##0.00}") %>'></asp:Label>
</td>
</tr>
<tr>
<th>百分比</th>
<td class="diaplay1">
<asp:Label ID="lb五分比" runat="server" Text='<%# Eval("五分比", "{0:##0.00}%") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb四分比" runat="server" Text='<%# Eval("四分比", "{0:##0.00}%") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb三分比" runat="server" Text='<%# Eval("三分比", "{0:##0.00}%") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb二分比" runat="server" Text='<%# Eval("二分比", "{0:##0.00}%") %>'></asp:Label>
</td>
<td class="diaplay1">
<asp:Label ID="lb一分比" runat="server" Text='<%# Eval("一分比", "{0:##0.00}%") %>'></asp:Label>
</td>
<td class="diaplay1">100%</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</div>
</ItemTemplate>
</asp:DataList>
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Education.Forms.UC
{
public partial class 滿View : UserControlBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
[Bindable(true)]
public int
{
get;
set;
}
protected void ds課程內容_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["訓練課程企劃編號"] = ;
}
protected void dl課程內容_ItemDataBound(object sender, DataListItemEventArgs e)
{
HiddenField hf訓練課程企劃編號 = e.Item.FindControl("hf訓練課程企劃編號") as HiddenField;
HiddenField hf課程序號 = e.Item.FindControl("hf課程序號") as HiddenField;
ObjectDataSource ds滿意度分析 = e.Item.FindControl("ds滿意度分析") as ObjectDataSource;
DataList dl滿意度分析 = e.Item.FindControl("dl滿意度分析") as DataList;
if (hf訓練課程企劃編號 != null && hf課程序號 != null && ds滿意度分析 != null && dl滿意度分析 != null)
{
ds滿意度分析.SelectParameters["訓練課程企劃編號"].DefaultValue = hf訓練課程企劃編號.Value;
ds滿意度分析.SelectParameters["課程序號"].DefaultValue = hf課程序號.Value;
dl滿意度分析.DataSource = ds滿意度分析;
dl滿意度分析.DataBind();
}
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class 滿View
{
/// <summary>
/// ds課程內容 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds課程內容;
/// <summary>
/// dl課程內容 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.DataList dl課程內容;
}
}
@@ -0,0 +1,296 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="訓練檢討報告View.ascx.cs"
Inherits="Education.Forms.檢視UC.訓練檢討報告View" EnableViewState="false" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<%@ Import namespace="Education" %>
<asp:ObjectDataSource ID="ds訓練檢討報告" runat="server"
DataObjectTypeName="Education.訓練檢討報告"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" TypeName="Education.DAC_訓練檢討報告"
OnObjectCreating="ds訓練檢討報告_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="訓練課程企劃編號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:FormView ID="FormView1" runat="server"
EnableModelValidation="True" EnableViewState="False"
DataKeyNames="訓練課程企劃編號,DB_APPNO" DataSourceID="ds訓練檢討報告"
OnDataBound="FormView1_DataBound">
<ItemTemplate>
<table border="0" cellpadding="3" cellspacing="2"
style="table-layout: fixed;">
<tr>
<td class="widthcontrol" colspan="1" style="width: 90px;"></td>
<td class="widthcontrol" colspan="1"
style="width: 120px;"></td>
<td class="widthcontrol" colspan="1" style="width: 90px;"></td>
<td class="widthcontrol" colspan="1"
style="width: 120px;"></td>
<td class="widthcontrol" colspan="1" style="width: 110px;"></td>
<td class="widthcontrol" colspan="1"
style="width: 120px;"></td>
<td class="widthcontrol" colspan="1" style="width: 90px;"></td>
<td class="widthcontrol" colspan="1"
style="width: 120px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表日期Label" runat="server" Text="填表日期"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb填表日期" runat="server"
CssClass="inputFull" Text='<%# Eval("填表日期", "{0:yyyy-MM-dd}") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表人員Label" runat="server" Text="填表人員"></asp:Label>
</td>
<td class="datadisplay" colspan="2">
<asp:Label ID="lb填表人員" runat="server" CssClass="inputFull"
Text='<%# Bind("填表人員") %>'></asp:Label>
<asp:Label ID="lb填表人員X" runat="server" CssClass="inputFull"
Text='<%# Get員工姓名(Eval("填表人員")) %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表日期Label0" runat="server" Text="學員出席率"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb學員出席率" runat="server"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表日期Label1" runat="server" Text="訓練經費"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb訓練經費" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb參與人數Label" runat="server" Text="參與人數"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb參與人數" runat="server"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb回收數Label" runat="server" Text="回收數"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb回收數" runat="server"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb回收率Label" runat="server" Text="回收率"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb回收率" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表日期Label2" runat="server">行政服務品<br/>質滿意度</asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb行政滿意度" runat="server"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表日期Label4" runat="server">餐點與茶飲<br/>滿意度</asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb餐點滿意度" runat="server"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表日期Label3" runat="server">場地滿意度</asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb場地滿意度" runat="server"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb填表日期Label5" runat="server" Text="整體滿意度"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb整體滿意度" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb填表日期Label6" runat="server" Text="講師滿意度"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:GridView ID="gv講師滿意度" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="節次" HeaderText="節次">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="講師編號" DataFormatString="{0:0000}" HeaderText="講師編號">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="講師姓名" HeaderText="講師姓名">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="滿意度" DataFormatString="{0:##0.00}" HeaderText="滿意度">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb學員建議Label" runat="server" Text="學員建議"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb學員建議" runat="server" CssClass="inputFull"
Text='<%# Eval("學員建議", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb檢討與改善Label" runat="server" Text="檢討與改善"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb檢討與改善" runat="server"
CssClass="inputFull" Text='<%# Eval("檢討與改善", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb講師建議Label" runat="server" Text="講師建議"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb講師建議" runat="server"
CssClass="inputFull" Text='<%# Eval("講師建議", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb檢討與改善1Label" runat="server" Text="檢討與改善"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb檢討與改善1" runat="server"
CssClass="inputFull" Text='<%# Eval("檢討與改善1", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>'></asp:Label>
</td>
</tr>
</table>
<br />
<table border="0" cellpadding="3" cellspacing="2" style="table-layout:fixed; display:none">
<tr>
<td class="widthcontrol" colspan="1" style="width:90px"></td>
<td class="widthcontrol" colspan="1" style="width:280px"></td>
<td class="widthcontrol" colspan="1" style="width:170px"></td>
<td class="widthcontrol" colspan="1" style="width:180px"></td>
<td class="widthcontrol"></td>
</tr>
<tr>
<th class="caption">改善措施</th>
<th class="caption">改善內容</th>
<th class="caption">改善作法</th>
<th class="caption">補充說明</th>
<td></td>
</tr>
<tr>
<td class="caption">學員</td>
<td class="datadisplay">
<asp:Label ID="lb學員改善內容" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善內容_學員名稱(Eval("改善措施_學員_改善內容")) %>' />
<asp:Label ID="lb學員改善內容其他" runat="server" Text='<%# Eval("改善措施_學員_改善內容_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb學員改善作法" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善作法名稱(Eval("改善措施_學員_改善作法")) %>' />
<asp:Label ID="lb學員改善作法其他" runat="server" Text='<%# Eval("改善措施_學員_改善作法_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb學員補充說明" runat="server"
Text='<%# Eval("改善措施_學員_補充說明") %>' />
</td>
<td></td>
</tr>
<tr>
<td class="caption">講師</td>
<td class="datadisplay">
<asp:Label ID="lb講師改善內容" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善內容_講師名稱(Eval("改善措施_講師_改善內容")) %>' />
<asp:Label ID="lb講師改善內容其他" runat="server" Text='<%# Eval("改善措施_講師_改善內容_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb講師改善作法" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善作法名稱(Eval("改善措施_講師_改善作法")) %>' />
<asp:Label ID="lb講師改善作法其他" runat="server" Text='<%# Eval("改善措施_講師_改善作法_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb講師補充說明" runat="server"
Text='<%# Eval("改善措施_講師_補充說明") %>' />
</td>
<td></td>
</tr>
<tr>
<td class="caption">教材及教具</td>
<td class="datadisplay">
<asp:Label ID="lb教材及教具改善內容" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善內容_教材及教具名稱(Eval("改善措施_教材及教具_改善內容")) %>' />
<asp:Label ID="lb教材及教具改善內容其他" runat="server" Text='<%# Eval("改善措施_教材及教具_改善內容_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb教材及教具改善作法" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善作法名稱(Eval("改善措施_教材及教具_改善作法")) %>' />
<asp:Label ID="lb教材及教具改善作法其他" runat="server" Text='<%# Eval("改善措施_教材及教具_改善作法_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb教材及教具補充說明" runat="server"
Text='<%# Eval("改善措施_教材及教具_補充說明") %>' />
</td>
<td></td>
</tr>
<tr>
<td class="caption">教學方法</td>
<td class="datadisplay">
<asp:Label ID="lb教學方法改善內容" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善內容_教學方法名稱(Eval("改善措施_教學方法_改善內容")) %>' />
<asp:Label ID="lb教學方法改善內容其他" runat="server" Text='<%# Eval("改善措施_教學方法_改善內容_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb教學方法改善作法" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善作法名稱(Eval("改善措施_教學方法_改善作法")) %>' />
<asp:Label ID="lb教學方法改善作法其他" runat="server" Text='<%# Eval("改善措施_教學方法_改善作法_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb教學方法補充說明" runat="server"
Text='<%# Eval("改善措施_教學方法_補充說明") %>' />
</td>
<td></td>
</tr>
<tr>
<td class="caption">場地及設備</td>
<td class="datadisplay">
<asp:Label ID="lb場地及設備改善內容" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善內容_場地及設備名稱(Eval("改善措施_場地及設備_改善內容")) %>' />
<asp:Label ID="lb場地及設備改善內容其他" runat="server" Text='<%# Eval("改善措施_場地及設備_改善內容_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb場地及設備改善作法" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善作法名稱(Eval("改善措施_場地及設備_改善作法")) %>' />
<asp:Label ID="lb場地及設備改善作法其他" runat="server" Text='<%# Eval("改善措施_場地及設備_改善作法_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb場地及設備補充說明" runat="server"
Text='<%# Eval("改善措施_場地及設備_補充說明") %>' />
</td>
<td></td>
</tr>
<tr>
<td class="caption">行政流程</td>
<td class="datadisplay">
<asp:Label ID="lb行政流程改善內容" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善內容_行政流程名稱(Eval("改善措施_行政流程_改善內容")) %>' />
<asp:Label ID="lb行政流程改善內容其他" runat="server" Text='<%# Eval("改善措施_行政流程_改善內容_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb行政流程改善作法" runat="server"
Text='<%# DAC_檢討報告改善措施選項.Get改善作法名稱(Eval("改善措施_行政流程_改善作法")) %>' />
<asp:Label ID="lb行政流程改善作法其他" runat="server" Text='<%# Eval("改善措施_行政流程_改善作法_其他") %>' />
</td>
<td class="datadisplay">
<asp:Label ID="lb行政流程補充說明" runat="server"
Text='<%# Eval("改善措施_行政流程_補充說明") %>' />
</td>
<td></td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
@@ -0,0 +1,75 @@
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 WebLib;
namespace Education.Forms.UC
{
public partial class View : UserControlBase
{
int ID = 0;
public override void DataBind()
{
base.DataBind();
ID = DAC.GetInt32();
ds訓練檢討報告.SelectParameters["訓練課程企劃編號"].DefaultValue = ;
FormView1.DataBind();
}
protected void ds訓練檢討報告_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = new DAC_訓練檢討報告(ParentPage.conn);
}
protected void FormView1_DataBound(object sender, EventArgs e)
{
if (FormView1.CurrentMode == FormViewMode.ReadOnly && FormView1.FindControl("lb學員出席率") != null)
{
FindControl<Label>(FormView1, "lb學員出席率").Text = String.Format("{0:##0.00}%", Dao課程報名.Get出席率(ID));
DAC_課程經費 Dao課程經費 = new DAC_課程經費(ParentPage.conn);
FindControl<Label>(FormView1, "lb訓練經費").Text = String.Format("{0:###,###,##0}", Dao課程經費.Get經費合計(ID));
DAC_滿意度調查課程企劃 Dao滿意度調查課程企劃 = new DAC_滿意度調查課程企劃(ParentPage.conn);
DataTable d1 = Dao滿意度調查課程企劃.Select滿意度統計(ID);
if (d1.Rows.Count > 0)
{
int = DAC.GetInt32(d1.Rows[0]["回收數"]);
DAC_學員出席 Dao學員出席 = new DAC_學員出席(ParentPage.conn);
// int 參與人數 = Dao學員出席.Get參與人數(課程企劃ID);
int = Dao課程報名.Get報名人數(ID);
FindControl<Label>(FormView1, "lb行政滿意度").Text = String.Format("{0:##0.00}", d1.Rows[0]["行政滿意度"]);
FindControl<Label>(FormView1, "lb餐點滿意度").Text = String.Format("{0:##0.00}", d1.Rows[0]["餐點滿意度"]);
FindControl<Label>(FormView1, "lb場地滿意度").Text = String.Format("{0:##0.00}", d1.Rows[0]["場地滿意度"]);
FindControl<Label>(FormView1, "lb整體滿意度").Text = String.Format("{0:##0.00}", d1.Rows[0]["整體滿意度"]);
FindControl<Label>(FormView1, "lb參與人數").Text = String.Format("{0}", );
FindControl<Label>(FormView1, "lb回收數").Text = String.Format("{0}", );
FindControl<Label>(FormView1, "lb回收率").Text = > 0 ? String.Format("{0:##0.00}", DAC.GetDecimal() / DAC.GetDecimal() * 100) : "--";
}
else
{
FindControl<Label>(FormView1, "lb行政滿意度").Text = "";
FindControl<Label>(FormView1, "lb餐點滿意度").Text = "";
FindControl<Label>(FormView1, "lb場地滿意度").Text = "";
FindControl<Label>(FormView1, "lb整體滿意度").Text = "";
FindControl<Label>(FormView1, "lb參與人數").Text = "";
FindControl<Label>(FormView1, "lb回收數").Text = "";
FindControl<Label>(FormView1, "lb回收率").Text = "";
}
DAC_滿意度調查講師 Dao滿意度調查講師 = new DAC_滿意度調查講師(ParentPage.conn);
(FormView1.FindControl("gv講師滿意度") as GridView).DataSource = Dao滿意度調查講師.Select滿意度統計(ID);
(FormView1.FindControl("gv講師滿意度") as GridView).DataBind();
}
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class View
{
/// <summary>
/// ds訓練檢討報告 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds訓練檢討報告;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
}
}
@@ -0,0 +1,421 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="訓練課程企劃書View.ascx.cs"
Inherits="Education.Forms.檢視UC.訓練課程企劃書View" EnableViewState="false" %>
<%@ Import Namespace="WebLib" %>
<%@ Import Namespace="Education" %>
<%@ Register Src="~/Forms/Common/起訖日顯示.ascx" TagPrefix="uc1" TagName="起訖日顯示" %>
<%@ Register Src="~/Forms/檢視UC/場地遴選View.ascx" TagPrefix="uc1" TagName="場地遴選View" %>
<%@ Register Src="~/Forms/檢視UC/講師遴選View.ascx" TagPrefix="uc1" TagName="講師遴選View" %>
<%@ Register Src="~/Forms/檢視UC/教材遴選View.ascx" TagPrefix="uc1" TagName="教材遴選View" %>
<asp:ObjectDataSource ID="dsForm" runat="server"
DataObjectTypeName="Education.訓練課程企劃"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" TypeName="Education.DAC_訓練課程企劃"
OnObjectCreating="dsForm_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="編號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds課程內容" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectBy課程企劃"
TypeName="Education.DAC_訓練課程內容"
DataObjectTypeName="Education.訓練課程內容"
OnObjectCreating="ds課程內容_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="訓練課程企劃編號" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<a href="#" onclick="changeTab('1')" id="tabButton1" name="tabButton" class="tabButtonSelected">
課程企劃書</a>
<a href="#" onclick="changeTab('2')" id="tabButton2" name="tabButton" class="tabButton">
課程內容</a>
<a href="#" onclick="changeTab('3')" id="tabButton3" name="tabButton" class="tabButton">
場地遴選</a>
<div style="border-top: 1px solid #C0C0C0">
<div id="page1" name="page" style="display: block">
<asp:FormView ID="FormView1" runat="server" EnableModelValidation="True"
EnableViewState="False" DataKeyNames="編號,DB_APPNO"
DataSourceID="dsForm">
<ItemTemplate>
<table border="0" class="fixedwithoutborder">
<tr>
<td colspan="1" class="widthcontrol" style="width: 60pt;"></td>
<td colspan="1" class="widthcontrol" style="width: auto;"></td>
<td colspan="1" class="widthcontrol" style="width: 90pt;"></td>
<td colspan="1" class="widthcontrol" style="width: auto;"></td>
<td colspan="1" class="widthcontrol" style="width: 90pt;"></td>
<td colspan="1" class="widthcontrol" style="width: auto;"></td>
<td colspan="1" class="widthcontrol" style="width: 120pt;"></td>
<td colspan="1" class="widthcontrol" style="width: auto;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb編號" runat="server" CssClass="inputFull" Text='<%# Bind("顯示編號") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb計畫別Label" runat="server" Text="職能類型"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb計畫別" runat="server" Text='<%# Education.DAC_計畫別.Get計畫別名稱(Eval("計畫別")) %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練名稱Label" runat="server" Text="訓練名稱"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb訓練名稱" runat="server" CssClass="inputFull" Text='<%# Bind("訓練名稱") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練日期Label" runat="server" Text="訓練日期"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<uc1:起訖日顯示 runat="server" ID="起訖日顯示" 起日='<%# Eval("訓練日期") %>' 迄日='<%# Eval("訓練日期迄") %>'
Format="yyyyMMdd" />
</td>
<td class="caption">
<asp:Label ID="lb訓練時數Label" runat="server" Text="訓練時數"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb訓練時數" runat="server" CssClass="inputFull"
Text='<%# Bind("訓練時數") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb預估經費Label" runat="server" Text="預估經費"></asp:Label>
</td>
<td class="datadisplay">
<asp:Label ID="lb預估經費" runat="server" CssClass="inputFull"
Text='<%# Bind("預估經費") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練目標Label" runat="server" Text="訓練目標"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb訓練目標" runat="server" Text='<%# Eval("訓練目標", "{0}").Replace("\r", "<br/>") %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb訓練場地Label" runat="server" Text="訓練場地"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb訓練場地" runat="server" Text='<%# GetData.取得選定場地(DAC.GetInt32(Eval("編號"))) %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb教學方法Label" runat="server" Text="教學方法"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb教學方法" runat="server" CssClass="inputFull" Text='<%# Eval("教學方法", "{0}").Replace("\r", "<br/>") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb教學方法Label5" runat="server" Text="評估方式"></asp:Label>
</td>
<td colspan="7">
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse;">
<tr>
<td style="background-color: #BBBBBB;">
<asp:Label ID="lb教學方法Label1" runat="server" Text="反應"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb滿意度調查及分析Label" runat="server" Text="滿意度調查及分析"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb滿意度調查及分析" runat="server" CssClass="inputFull" Text='<%# Eval("滿意度調查及分析", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
</tr>
<tr>
<td style="background-color: #BBBBBB;">
<asp:Label ID="lb教學方法Label2" runat="server" Text="學習"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課堂測驗Label" runat="server" Text="課堂測驗"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb課堂測驗" runat="server" CssClass="inputFull" Text='<%# Eval("課堂測驗", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb課堂分享Label" runat="server" Text="課堂分享"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb課堂分享" runat="server" CssClass="inputFull"
Text='<%# Eval("課堂分享", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb演練Label" runat="server" Text="演練"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb演練" runat="server" CssClass="inputFull" Text='<%# Eval("演練", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
</tr>
<tr>
<td style="background-color: #BBBBBB;">
<asp:Label ID="lb教學方法Label3" runat="server" Text="行為"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb效益追蹤Label" runat="server" Text="效益追蹤調查(主管督導)"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb效益追蹤" runat="server" CssClass="inputFull" Text='<%# Eval("效益追蹤", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb心得報告Label" runat="server" Text="心得報告(本人)"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb心得報告" runat="server" CssClass="inputFull" Text='<%# Eval("心得報告", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb學習應用Label" runat="server" Text="學習應用(實做)"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb學習應用" runat="server" CssClass="inputFull" Text='<%# Eval("學習應用", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
</tr>
<tr>
<td style="background-color: #BBBBBB;">
<asp:Label ID="lb教學方法Label4" runat="server" Text="成果"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb客戶滿意度Label" runat="server" Text="客戶滿意度"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb客戶滿意度" runat="server" CssClass="inputFull" Text='<%# Eval("客戶滿意度", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb民眾滿意度Label" runat="server" Text="民眾滿意度"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb民眾滿意度" runat="server" CssClass="inputFull" Text='<%# Eval("民眾滿意度", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb績效表揚Label" runat="server" Text="績效表揚"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb績效表揚" runat="server" CssClass="inputFull" Text='<%# Eval("績效表揚", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb傑出事蹟Label" runat="server" Text="傑出事蹟"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center;">
<asp:Label ID="lb傑出事蹟" runat="server" CssClass="inputFull" Text='<%# Eval("傑出事蹟", "{0}").ToUpper() == "Y" ? "是" : "否" %>'></asp:Label>
</td>
</tr>
</table>
※備註:評估方式勾選後,皆必須據相關證明文件。</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb預期效益Label" runat="server" Text="預期效益"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb預期效益" runat="server" CssClass="inputFull" Text='<%# Eval("預期效益", "{0}").Replace("\r", "<br/>") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label2" runat="server" Text="人數"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb人數" runat="server" CssClass="inputFull" Text='<%# Bind("人數") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="Label3" runat="server" Text="開放報名日期"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb開放報名日期" runat="server" CssClass="inputFull" Text='<%# Eval("開放報名日期", "{0:yyyyMMdd}") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="Label4" runat="server" Text="報名截止期限"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb報名截止期限" runat="server" CssClass="inputFull" Text='<%# Bind("報名截止期限") %>'></asp:Label>
天前
</td>
<td class="caption">
<asp:Label ID="Label5" runat="server" Text="取消報名截止期限"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb取消報名截止期限" runat="server" CssClass="inputFull" Text='<%# Bind("取消報名截止期限") %>'></asp:Label>
天前
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb承辦Label" runat="server" Text="承辦"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb承辦" runat="server" CssClass="inputFull" Text='<%# Bind("承辦") %>'></asp:Label>
<asp:Label ID="lb承辦X" runat="server" Text='<%# Get員工姓名(Eval("承辦")) %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb已簽核Label" runat="server" Text="已簽核"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb已簽核" runat="server" Text='<%# Eval("已簽核", "{0}").ToUpper() == "Y" ? "是" : "否" %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb已取消Label" runat="server" Text="已取消"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb已取消" runat="server" Text='<%# Eval("已取消", "{0}").ToUpper() == "Y" ? "是" : "否" %>'
CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb已結案Label" runat="server" Text="已結案"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb已結案" runat="server" Text='<%# Eval("已結案", "{0}").ToUpper() == "Y" ? "是" : "否" %>'
CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
</div>
<div id="page2" name="page" style="display: none">
<asp:Repeater ID="dl課程內容" runat="server" DataSourceID="ds課程內容">
<HeaderTemplate>
<table border="1" class="fixedwithborder" style="width:100%; border-collapse:collapse">
<th style="width:50px">節次</th>
<th>課程編號 / 課程類別</th>
<th>日期時間</th>
<th style="width:600px">課程名稱 / 課程大綱</th>
<th style="width:50px">時數</th>
<th>選定講師</th>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td style="text-align:center">
<asp:Label ID="Label1" runat="server" ForeColor="Blue"
Text='<%# Bind("節次") %>'></asp:Label>
</td>
<td>
<asp:Label ID="Label18" runat="server" ForeColor="Blue"
Text='<%# Bind("課程編號") %>'></asp:Label>
<br />
[<asp:Label ID="Label19" runat="server"
Text='<%# Bind("課程類別") %>'></asp:Label>]
<asp:Label ID="Label4X" runat="server"
Text='<%# Get類別名稱("課程類別", Eval("課程類別")) %>'></asp:Label>
</td>
<td style="text-align:center">
<asp:Label ID="lb訓練日期" runat="server" MaxLength="5" Text='<%# Eval("訓練日期", "{0:yyyy-MM-dd}") %>'></asp:Label><br />
<asp:Label ID="lb時間" runat="server" MaxLength="5" Text='<%# Education.訓練課程內容.Get起訖時間Str(Eval("時間起"), Eval("時間迄")) %>'></asp:Label>
</td>
<td>
<asp:Label ID="Label20" runat="server"
Text='<%# Bind("課程名稱") %>' ForeColor="Blue"></asp:Label>
<div style="padding-left: 10px">
<asp:Label ID="Label21" runat="server"
Text='<%# Eval("課程大綱", "{0}").Replace("\r\n", "<br/>") %>'></asp:Label>
</div>
</td>
<td style="text-align:center">
<asp:Label ID="Label22" runat="server"
Text='<%# Bind("時數") %>'></asp:Label>
</td>
<td>
<asp:Label ID="Label23" runat="server" Text='<%# Get選定講師(Eval("訓練課程企劃編號"), Eval("課程序號")) %>'></asp:Label><br />
</td>
</tr>
<tr>
<td colspan="6" style="padding: 5px 5px 5px 20px">
<uc1:講師遴選View runat="server" ID="講師遴選View"
單號='<%# String.Format("{0}|{1}", Eval("訓練課程企劃編號"), Eval("課程序號")) %>'
OnDataBinding="講師遴選View_DataBinding" />
</td>
</tr>
<tr>
<td colspan="6" style="padding: 5px 5px 5px 20px">
<uc1:教材遴選View runat="server" ID="教材遴選View" 單號='<%# String.Format("{0}|{1}", Eval("訓練課程企劃編號"), Eval("課程序號")) %>'
OnDataBinding="教材遴選View_DataBinding"/>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:GridView ID="gv課程內容" runat="server" Visible="false"
AutoGenerateColumns="False" DataKeyNames="訓練課程企劃編號,課程序號,DB_APPNO"
DataSourceID="ds課程內容" EnableModelValidation="True" CssClass="fixedwithborder"
Width="100%">
<Columns>
<asp:BoundField DataField="節次" HeaderText="節次"
ReadOnly="True">
<HeaderStyle Width="50px" />
<ItemStyle HorizontalAlign="Center" Width="50px" VerticalAlign="Top" />
</asp:BoundField>
<asp:TemplateField HeaderText="課程編號 / 課程類別">
<ItemTemplate>
<asp:Label ID="Label18" runat="server" ForeColor="Blue"
Text='<%# Bind("課程編號") %>'></asp:Label>
<br />
[<asp:Label ID="Label19" runat="server"
Text='<%# Bind("課程類別") %>'></asp:Label>]
<asp:Label ID="Label4X" runat="server"
Text='<%# Get類別名稱("課程類別", Eval("課程類別")) %>'></asp:Label>
</ItemTemplate>
<HeaderStyle />
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
</asp:TemplateField>
<asp:TemplateField HeaderText="日期時間">
<ItemTemplate>
<asp:Label ID="lb訓練日期" runat="server" MaxLength="5" Text='<%# Eval("訓練日期", "{0:yyyy-MM-dd}") %>'></asp:Label><br />
<asp:Label ID="lb時間" runat="server" MaxLength="5" Text='<%# Education.訓練課程內容.Get起訖時間Str(Eval("時間起"), Eval("時間迄")) %>'></asp:Label>
</ItemTemplate>
<HeaderStyle />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
</asp:TemplateField>
<asp:TemplateField HeaderText="課程名稱 / 課程大綱">
<ItemTemplate>
<asp:Label ID="Label20" runat="server"
Text='<%# Bind("課程名稱") %>' ForeColor="Blue"></asp:Label>
<div style="padding-left: 10px">
<asp:Label ID="Label21" runat="server"
Text='<%# Eval("課程大綱", "{0}").Replace("\r\n", "<br/>") %>'></asp:Label>
</div>
</ItemTemplate>
<HeaderStyle Width="600px" />
<ItemStyle Width="600px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="時數" SortExpression="時數">
<ItemTemplate>
<asp:Label ID="Label22" runat="server"
Text='<%# Bind("時數") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="50px" />
<ItemStyle HorizontalAlign="Center" Width="50px" VerticalAlign="Top" />
</asp:TemplateField>
<asp:TemplateField HeaderText="選定講師">
<ItemTemplate>
</ItemTemplate>
<HeaderStyle />
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div id="page3" name="page" style="display: none">
<uc1:場地遴選View runat="server" ID="場地遴選View" 單號="" />
</div>
</div>
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.UC
{
public partial class View : UserControlBase
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
ParentPage = Page as FormBase;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
}
public override void DataBind()
{
dsForm.SelectParameters["編號"].DefaultValue = ;
ds課程內容.SelectParameters["訓練課程企劃編號"].DefaultValue = ;
View.ParentPage = this.ParentPage;
View. = ;
base.DataBind();
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練課程企劃;
}
protected void ds課程內容_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = new DAC_訓練課程內容(ParentPage.conn);
}
protected string Get選定講師(object , object )
{
d = GetData.(DAC.GetInt32(), DAC.GetInt32());
if (d. == 0)
return "";
else
return string.Format("[{0:0000}]<br>{1}", d., d.);
}
protected void View_DataBinding(object sender, EventArgs e)
{
(sender as View).ParentPage = this.ParentPage;
}
protected void View_DataBinding(object sender, EventArgs e)
{
(sender as View).ParentPage = this.ParentPage;
}
}
}
@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class View
{
/// <summary>
/// dsForm 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource dsForm;
/// <summary>
/// ds課程內容 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds課程內容;
/// <summary>
/// FormView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView FormView1;
/// <summary>
/// dl課程內容 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater dl課程內容;
/// <summary>
/// gv課程內容 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv課程內容;
/// <summary>
/// 場地遴選View 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.UC.View View;
}
}
@@ -0,0 +1,192 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="講師遴選View.ascx.cs" Inherits="Education.Forms.檢視UC.講師遴選View"
EnableViewState="false" %>
<table style="table-layout: fixed; width: 100%;">
<%-- <tr>
<td style="width: 145px" class="caption">
<asp:Label ID="Label9" runat="server" Text="課程企劃"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb課程企劃" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="width: 145px" class="caption">
<asp:Label ID="Label10" runat="server" Text="課程內容"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb課程內容" runat="server"></asp:Label>
</td>
</tr>--%>
<tr>
<td style="width: 145px">&nbsp;</td>
<td class="captionCenter" colspan="1" style="width: 33%">
<asp:Label ID="Label11" runat="server" Text="講師一"></asp:Label>
</td>
<td class="captionCenter" colspan="1" style="width: 33%">
<asp:Label ID="Label12" runat="server" Text="講師二"></asp:Label>
</td>
<td class="captionCenter" colspan="1" style="width: 33%">
<asp:Label ID="Label13" runat="server" Text="講師三"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label15" runat="server" Text="姓名"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師一" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師二" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師三" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label23" runat="server" Text="學歷"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師一0" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師二0" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師三0" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label24" runat="server" Text="現職"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師一1" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師二1" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb講師三1" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label16" runat="server" Text="師資來源"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="ddl師資來源A" runat="server">
</asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="ddl師資來源B" runat="server">
</asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="ddl師資來源C" runat="server">
</asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label17" runat="server" Text="專業背景 25%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt專業背景A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt專業背景B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt專業背景C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label18" runat="server" Text="講授經驗 25%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt講授經驗A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt講授經驗B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt講授經驗C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label19" runat="server" Text="口碑與評價 20%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt口碑評價A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt口碑評價B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt口碑評價C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label20" runat="server" Text="費用 20%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt費用A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt費用B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt費用C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label21" runat="server" Text="配合度 10%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt配合度A" runat="server" Columns="6" MaxLength="2" ValidationGroup="1"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt配合度B" runat="server" Columns="6" MaxLength="2" ValidationGroup="2"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="txt配合度C" runat="server" Columns="6" MaxLength="2" ValidationGroup="3"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label22" runat="server" Text="合計 100%"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb合計A" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb合計B" runat="server"></asp:Label>
</td>
<td class="datadisplay" style="text-align: center">
<asp:Label ID="lb合計C" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label25" runat="server" Text="總評"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="txt總評" runat="server" CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label26" runat="server" Text="備註"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="txt備註" runat="server" CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
@@ -0,0 +1,176 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.UC
{
public partial class View : UserControlBase
{
private Dictionary<string, string> List = new Dictionary<string, string>();
public override void DataBind()
{
base.DataBind();
List.Add("" , "");
List.Add("O", "原合作");
List.Add("N", "新開發");
int ID = 0;
int = 0;
if ( == null)
return;
string[] keyArr = .Split('|');
if (keyArr.Length > 0)
ID = DAC.GetInt32(keyArr[0]);
if (keyArr.Length > 1)
= DAC.GetInt32(keyArr[1]);
DAC_訓練課程企劃 Dao課程企劃 = new DAC_訓練課程企劃(ParentPage.conn);
DAC_訓練課程內容 Dao課程內容 = new DAC_訓練課程內容(ParentPage.conn);
DAC_講師遴選 Dao講師遴選 = new DAC_講師遴選(ParentPage.conn);
List v1 = Dao課程企劃.SelectOne(ID);
List v2 = Dao課程內容.SelectOne(ID, );
List v3 = Dao講師遴選.SelectOne(ID, );
//if (v1.Count > 0)
//{
// lb課程企劃.Text = String.Format("[{0}] {1}", v1[0].顯示編號, v1[0].訓練名稱);
//}
//if (v2.Count > 0)
//{
// lb課程內容.Text = String.Format("[{0}] {1}", v2[0].節次, v2[0].課程名稱);
//}
lb講師一.Text = "(尚未選擇)";
lb講師二.Text = "(尚未選擇)";
lb講師三.Text = "(尚未選擇)";
lb講師一0.Text = "";
lb講師一1.Text = "";
ddl師資來源A.Text = "";
txt專業背景A.Text = "";
txt講授經驗A.Text = "";
txt口碑評價A.Text = "";
txt費用A.Text = "";
txt配合度A.Text = "";
lb合計A.Text = "";
lb講師二0.Text = "";
lb講師二1.Text = "";
ddl師資來源B.Text = "";
txt專業背景B.Text = "";
txt講授經驗B.Text = "";
txt口碑評價B.Text = "";
txt費用B.Text = "";
txt配合度B.Text = "";
lb合計B.Text = "";
lb講師三0.Text = "";
lb講師三1.Text = "";
ddl師資來源C.Text = "";
txt專業背景C.Text = "";
txt講授經驗C.Text = "";
txt口碑評價C.Text = "";
txt費用C.Text = "";
txt配合度C.Text = "";
lb合計C.Text = "";
if (v3.Count > 0)
{
if (v3[0]._A > 0)
{
lb講師一.Text = String.Format("[{0:0000}] {1}", v3[0]._A, Dao講師.Get姓名(v3[0]._A));
lb講師一0.Text = v3[0]._A;
lb講師一1.Text = v3[0]._A;
ddl師資來源A.Text = List[v3[0]._A];
txt專業背景A.Text = v3[0]._A.ToString();
txt講授經驗A.Text = v3[0]._A.ToString();
txt口碑評價A.Text = v3[0]._A.ToString();
txt費用A.Text = v3[0]._A.ToString();
txt配合度A.Text = v3[0]._A.ToString();
lb合計A.Text = v3[0]._A.ToString();
}
else if (!String.IsNullOrEmpty(v3[0]._A))
{
lb講師一.Text = v3[0]._A;
lb講師一0.Text = v3[0]._A;
lb講師一1.Text = v3[0]._A;
ddl師資來源A.Text = List[v3[0]._A];
txt專業背景A.Text = v3[0]._A.ToString();
txt講授經驗A.Text = v3[0]._A.ToString();
txt口碑評價A.Text = v3[0]._A.ToString();
txt費用A.Text = v3[0]._A.ToString();
txt配合度A.Text = v3[0]._A.ToString();
lb合計A.Text = v3[0]._A.ToString();
}
if (v3[0]._B > 0)
{
lb講師二.Text = String.Format("[{0:0000}] {1}", v3[0]._B, Dao講師.Get姓名(v3[0]._B));
lb講師二0.Text = v3[0]._B;
lb講師二1.Text = v3[0]._B;
ddl師資來源B.Text = List[v3[0]._B];
txt專業背景B.Text = v3[0]._B.ToString();
txt講授經驗B.Text = v3[0]._B.ToString();
txt口碑評價B.Text = v3[0]._B.ToString();
txt費用B.Text = v3[0]._B.ToString();
txt配合度B.Text = v3[0]._B.ToString();
lb合計B.Text = v3[0]._B.ToString();
}
else if (!String.IsNullOrEmpty(v3[0]._B))
{
lb講師二.Text = v3[0]._B;
lb講師二0.Text = v3[0]._B;
lb講師二1.Text = v3[0]._B;
ddl師資來源B.Text = List[v3[0]._B];
txt專業背景B.Text = v3[0]._B.ToString();
txt講授經驗B.Text = v3[0]._B.ToString();
txt口碑評價B.Text = v3[0]._B.ToString();
txt費用B.Text = v3[0]._B.ToString();
txt配合度B.Text = v3[0]._B.ToString();
lb合計B.Text = v3[0]._B.ToString();
}
if (v3[0]._C > 0)
{
lb講師三.Text = String.Format("[{0:0000}] {1}", v3[0]._C, Dao講師.Get姓名(v3[0]._C));
lb講師三0.Text = v3[0]._C;
lb講師三1.Text = v3[0]._C;
ddl師資來源C.Text = List[v3[0]._C];
txt專業背景C.Text = v3[0]._C.ToString();
txt講授經驗C.Text = v3[0]._C.ToString();
txt口碑評價C.Text = v3[0]._C.ToString();
txt費用C.Text = v3[0]._C.ToString();
txt配合度C.Text = v3[0]._C.ToString();
lb合計C.Text = v3[0]._C.ToString();
}
else if (!String.IsNullOrEmpty(v3[0]._C))
{
lb講師三.Text = v3[0]._C;
lb講師三0.Text = v3[0]._C;
lb講師三1.Text = v3[0]._C;
ddl師資來源C.Text = List[v3[0]._C];
txt專業背景C.Text = v3[0]._C.ToString();
txt講授經驗C.Text = v3[0]._C.ToString();
txt口碑評價C.Text = v3[0]._C.ToString();
txt費用C.Text = v3[0]._C.ToString();
txt配合度C.Text = v3[0]._C.ToString();
lb合計C.Text = v3[0]._C.ToString();
}
txt總評.Text = v3[0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
txt備註.Text = v3[0]..Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>");
}
}
}
}
@@ -0,0 +1,440 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.UC
{
public partial class View
{
/// <summary>
/// Label11 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label11;
/// <summary>
/// Label12 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label12;
/// <summary>
/// Label13 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label13;
/// <summary>
/// Label15 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label15;
/// <summary>
/// lb講師一 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師一;
/// <summary>
/// lb講師二 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師二;
/// <summary>
/// lb講師三 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師三;
/// <summary>
/// Label23 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label23;
/// <summary>
/// lb講師一0 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師一0;
/// <summary>
/// lb講師二0 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師二0;
/// <summary>
/// lb講師三0 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師三0;
/// <summary>
/// Label24 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label24;
/// <summary>
/// lb講師一1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師一1;
/// <summary>
/// lb講師二1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師二1;
/// <summary>
/// lb講師三1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb講師三1;
/// <summary>
/// Label16 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label16;
/// <summary>
/// ddl師資來源A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label ddl師資來源A;
/// <summary>
/// ddl師資來源B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label ddl師資來源B;
/// <summary>
/// ddl師資來源C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label ddl師資來源C;
/// <summary>
/// Label17 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label17;
/// <summary>
/// txt專業背景A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt專業背景A;
/// <summary>
/// txt專業背景B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt專業背景B;
/// <summary>
/// txt專業背景C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt專業背景C;
/// <summary>
/// Label18 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label18;
/// <summary>
/// txt講授經驗A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt講授經驗A;
/// <summary>
/// txt講授經驗B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt講授經驗B;
/// <summary>
/// txt講授經驗C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt講授經驗C;
/// <summary>
/// Label19 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label19;
/// <summary>
/// txt口碑評價A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt口碑評價A;
/// <summary>
/// txt口碑評價B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt口碑評價B;
/// <summary>
/// txt口碑評價C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt口碑評價C;
/// <summary>
/// Label20 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label20;
/// <summary>
/// txt費用A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt費用A;
/// <summary>
/// txt費用B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt費用B;
/// <summary>
/// txt費用C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt費用C;
/// <summary>
/// Label21 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label21;
/// <summary>
/// txt配合度A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt配合度A;
/// <summary>
/// txt配合度B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt配合度B;
/// <summary>
/// txt配合度C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt配合度C;
/// <summary>
/// Label22 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label22;
/// <summary>
/// lb合計A 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb合計A;
/// <summary>
/// lb合計B 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb合計B;
/// <summary>
/// lb合計C 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb合計C;
/// <summary>
/// Label25 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label25;
/// <summary>
/// txt總評 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt總評;
/// <summary>
/// Label26 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label26;
/// <summary>
/// txt備註 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txt備註;
}
}
@@ -0,0 +1,25 @@
//
// 訓練溝通記錄使用的 script
//
function OpenAttachment(id)
{
window.open("附件檢視.aspx?id=" + id);
}
function ShowReference(id)
{
$.ajax({
type: "POST",
url: "溝通記錄.aspx/GetReference",
contentType: "application/json; charset=utf-8",
data: "{ id:\"" + id + "\"}",
dataType: "json",
success: function (response)
{
if (response && response.d)
$("span[name=lbReference]").html(response.d);
else
$("span[name=lbReference]").html("");
}
});
}
@@ -0,0 +1,53 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="檢附資料參考.aspx.cs" Inherits="Education.Forms.溝通記錄.檢附資料參考" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="ds檢附資料參考" runat="server"
DataObjectTypeName="Education.檢附資料參考Item"
OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectAll"
TypeName="Education.DAC_檢附資料參考"
UpdateMethod="UpdateOne">
</asp:ObjectDataSource>
<asp:GridView ID="gv檢附資料參考" runat="server"
AutoGenerateColumns="False"
DataSourceID="ds檢附資料參考"
EnableModelValidation="True"
DataKeyNames="BSPAR,BSCLS"
Width="100%">
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
CssClass="button green60" Text="更正"></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
CssClass="button blue60" Text="儲存"></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
CssClass="button red60" OnClientClick="return confirm(&quot;是否確定放棄更正?&quot;);"
Text="取消"></asp:LinkButton>
</EditItemTemplate>
<HeaderStyle Width="140px" />
</asp:TemplateField>
<asp:BoundField DataField="TEXT" HeaderText="溝通歷程" SortExpression="TEXT" ReadOnly="True">
<HeaderStyle Width="23em" />
</asp:BoundField>
<asp:TemplateField HeaderText="檢附資料參考" SortExpression="TEXT">
<EditItemTemplate>
<asp:TextBox runat="server" Text='<%# Bind("BSSCR") %>' ID="TextBox1" CssClass="inputFull" TextMode="MultiLine" Rows="5"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("BSSCR", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>' ID="Label1"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Content>
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "檢附資料參考設定";
if (IsPostBack)
gv檢附資料參考.DataBind();
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// ds檢附資料參考 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds檢附資料參考;
/// <summary>
/// gv檢附資料參考 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv檢附資料參考;
}
}
@@ -0,0 +1,396 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="溝通記錄.aspx.cs" Inherits="Education.Forms.溝通記錄.溝通記錄" %>
<%@ Register Src="../Common/訓練企劃搜尋.ascx" TagName="訓練企劃搜尋" TagPrefix="uc1" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.labelCol {
width: 110px !important;
}
.controlCol_1 {
width: 160px !important;
}
.controlCol_2 {
width: 160px !important;
}
</style>
<script type="text/javascript" src="CommRecord.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<uc1:訓練企劃搜尋 ID="訓練企劃搜尋" runat="server" 包含已結案="True" OnClick="btn查詢_Click"
訓練企劃狀態="全部" />
<asp:Label ID="lbMessage" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
<asp:ObjectDataSource ID="ds訓練溝通記錄Form" runat="server" DataObjectTypeName="Education.訓練溝通記錄Item"
TypeName="Education.DAC_訓練溝通記錄" OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" InsertMethod="InsertOne" UpdateMethod="UpdateOne" DeleteMethod="DeleteOne"
OnObjectCreating="ds訓練溝通記錄Form_ObjectCreating">
<SelectParameters>
<asp:ControlParameter Name="編號" Type="Int32" ControlID="gv訓練溝通記錄" PropertyName="SelectedDataKey[&quot;編號&quot;]"></asp:ControlParameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds訓練溝通記錄Grid" runat="server" DataObjectTypeName="Education.訓練溝通記錄Item"
TypeName="Education.DAC_訓練溝通記錄" OldValuesParameterFormatString="original_{0}"
EnablePaging="true" SelectMethod="SelectPage" SelectCountMethod="SelectCount"
OnObjectCreating="ds訓練溝通記錄Grid_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="noInputReturnAll" Type="Boolean" DefaultValue="true" />
<asp:Parameter Name="orderBy" Type="String" DefaultValue="溝通歷程,日期" />
<asp:ControlParameter Name="訓練課程企劃編號" Type="Int32" ControlID="訓練企劃搜尋" PropertyName="訓練企劃編號"></asp:ControlParameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:Panel runat="server" ID="Panel1" Visible="false">
<asp:FormView ID="fv訓練溝通記錄" runat="server" EnableModelValidation="True" EnableViewState="False"
DataKeyNames="編號,訓練課程企劃編號,DB_APPNO" DataSourceID="ds訓練溝通記錄Form"
OnItemInserting="fv訓練溝通記錄_ItemInserting"
OnItemDeleted="fv訓練溝通記錄_ItemDeleted"
OnDataBound="fv訓練溝通記錄_DataBound">
<ItemTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
<asp:LinkButton ID="btnUpdate" runat="server" Text="更正" CommandName="Edit" CssClass="button green80" />
<asp:LinkButton ID="btnDelete" runat="server" Text="刪除" CommandName="Delete" CssClass="button red80"
OnClientClick="return confirm(&quot;是否確定刪除此筆資料?&quot;);" />
<asp:LinkButton ID="btnAttach" runat="server" Text="附件管理" CssClass="button orange100"
OnClientClick='<%# GetOpenWindowJS("溝通記錄附件.aspx", "_attach", "id", Eval("編號")) %>' />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_2"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb溝通歷程Label" runat="server" Text="溝通歷程"></asp:Label>
</td>
<td class="datadisplay" colspan="3">
<asp:Label ID="lb溝通歷程" runat="server" Text='<%# Dao訓練溝通記錄歷程.GetName(Eval("溝通歷程")) %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb日期Label" runat="server" Text="日期"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb日期" runat="server" Text='<%# Eval("日期", "{0:yyyyMMdd}") %>' CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb對象Label" runat="server" Text="對象"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb對象" runat="server" Text='<%# Bind("對象") %>' CssClass="inputFull"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb溝通方式Label" runat="server" Text="溝通方式"></asp:Label>
</td>
<td class="datadisplay" colspan="1">
<asp:Label ID="lb溝通方式" runat="server" Text='<%# Bind("溝通方式") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb主題Label" runat="server" Text="主題"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb主題" runat="server" Text='<%# Bind("主題") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb內容Label" runat="server" Text="內容"></asp:Label>
</td>
<td class="datadisplay" colspan="7">
<asp:Label ID="lb內容" runat="server" Text='<%# Eval("內容", "{0}").Replace("\r\n", "<br/>").Replace("\r", "<br/>").Replace("\n", "<br/>") %>' CssClass="inputFull"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<InsertItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Insert" CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消新增?&quot;);" />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_2"></td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb溝通歷程Label" runat="server" Text="溝通歷程"></asp:Label>
</td>
<td class="datainput" colspan="3">
<weblib:WDropDownList ID="dd溝通歷程" runat="server" SelectedValue='<%# Bind("溝通歷程") %>' CssClass="inputFull"
onchange="ShowReference(this.value)">
<asp:ListItem Value="1" Text="年度計劃溝通紀錄(包含老師、學員、主管、客戶)" />
<asp:ListItem Value="2" Text="課程設計溝通紀錄(包含老師、學員、主管、客戶)" />
<asp:ListItem Value="3" Text="課程執行溝通紀錄(課中執行情況)" />
<asp:ListItem Value="4" Text="課後查核溝通紀錄(檢討會議紀錄)" />
<asp:ListItem Value="5" Text="成果溝通紀錄(老師、學員、主管回饋、意見)" />
<asp:ListItem Value="999" Text="其他" />
</weblib:WDropDownList>
<asp:RequiredFieldValidator ID="rfv溝通歷程" runat="server" ControlToValidate="dd溝通歷程" Display="Dynamic" ErrorMessage="請選擇"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb日期Label" runat="server" Text="日期"></asp:Label>
</td>
<td class="datainput" colspan="1">
<weblib:DateTextBox ID="txt日期" runat="server" Value='<%# Bind("日期") %>' DateOrder="YMD" DateSeparator="" CssClass="inputFull"></weblib:DateTextBox>
<asp:RequiredFieldValidator ID="rfv日期" runat="server" ControlToValidate="txt日期" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb對象Label" runat="server" Text="對象"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt對象" runat="server" Text='<%# Bind("對象") %>' MaxLength="50" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv對象" runat="server" ControlToValidate="txt對象" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb溝通方式Label" runat="server" Text="溝通方式"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt溝通方式" runat="server" Text='<%# Bind("溝通方式") %>' MaxLength="50" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv溝通方式" runat="server" ControlToValidate="txt溝通方式" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">檢附資料參考</td>
<td class="datadisplay" colspan="7">
<asp:Label id="lbReference" runat="server" name="lbReference"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb主題Label" runat="server" Text="主題"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:TextBox ID="txt主題" runat="server" Text='<%# Bind("主題") %>' MaxLength="100" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv主題" runat="server" ControlToValidate="txt主題" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb內容Label" runat="server" Text="內容"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:TextBox ID="txt內容" runat="server" Text='<%# Bind("內容") %>'
MaxLength="2147483647" CssClass="inputFull" TextMode="MultiLine" Rows="10"></asp:TextBox>
</td>
</tr>
</table>
</InsertItemTemplate>
<EditItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Update" CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消更正?&quot;);" />
<asp:HiddenField ID="hfDBAPPNO" runat="server" Value='<%# Bind("DB_APPNO") %>' />
</div>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_2"></td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb溝通歷程Label" runat="server" Text="溝通歷程"></asp:Label>
</td>
<td class="datainput" colspan="3">
<weblib:WDropDownList ID="dd溝通歷程" runat="server" SelectedValue='<%# Bind("溝通歷程") %>' CssClass="inputFull"
onchange="ShowReference(this.value)">
<asp:ListItem Value="1" Text="年度計劃溝通紀錄(包含老師、學員、主管、客戶)" />
<asp:ListItem Value="2" Text="課程設計溝通紀錄(包含老師、學員、主管、客戶)" />
<asp:ListItem Value="3" Text="課程執行溝通紀錄(課中執行情況)" />
<asp:ListItem Value="4" Text="課後查核溝通紀錄(檢討會議紀錄)" />
<asp:ListItem Value="5" Text="成果溝通紀錄(老師、學員、主管回饋、意見)" />
<asp:ListItem Value="999" Text="其他" />
</weblib:WDropDownList>
<asp:RequiredFieldValidator ID="rfv溝通歷程" runat="server" ControlToValidate="dd溝通歷程" Display="Dynamic" ErrorMessage="請選擇"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb日期Label" runat="server" Text="日期"></asp:Label>
</td>
<td class="datainput" colspan="1">
<weblib:DateTextBox ID="txt日期" runat="server" Value='<%# Bind("日期") %>' DateOrder="YMD" DateSeparator="" CssClass="inputFull"></weblib:DateTextBox>
<asp:RequiredFieldValidator ID="rfv日期" runat="server" ControlToValidate="txt日期" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb對象Label" runat="server" Text="對象"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt對象" runat="server" Text='<%# Bind("對象") %>' MaxLength="50" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv對象" runat="server" ControlToValidate="txt對象" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb溝通方式Label" runat="server" Text="溝通方式"></asp:Label>
</td>
<td class="datainput" colspan="1">
<asp:TextBox ID="txt溝通方式" runat="server" Text='<%# Bind("溝通方式") %>' MaxLength="50" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv溝通方式" runat="server" ControlToValidate="txt溝通方式" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">檢附資料參考</td>
<td class="datadisplay" colspan="7">
<asp:Label id="lbReference" runat="server" name="lbReference"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<span style="color: red;"></span><asp:Label ID="lb主題Label" runat="server" Text="主題"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:TextBox ID="txt主題" runat="server" Text='<%# Bind("主題") %>' MaxLength="100" CssClass="inputFull"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv主題" runat="server" ControlToValidate="txt主題" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb內容Label" runat="server" Text="內容"></asp:Label>
</td>
<td class="datainput" colspan="7">
<asp:TextBox ID="txt內容" runat="server" Text='<%# Bind("內容") %>'
MaxLength="2147483647" CssClass="inputFull" TextMode="MultiLine" Rows="10"></asp:TextBox>
</td>
</tr>
</table>
</EditItemTemplate>
<EmptyDataTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
</div>
<table border="0" style="table-layout: fixed">
<tr>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_1"></td>
<td colspan="1" class="widthcontrol labelCol"></td>
<td colspan="1" class="widthcontrol controlCol_2"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb溝通歷程Label" runat="server" Text="溝通歷程"></asp:Label>
</td>
<td class="datadisplay" colspan="3"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb日期Label" runat="server" Text="日期"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
<td class="caption">
<asp:Label ID="lb對象Label" runat="server" Text="對象"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
<td class="caption">
<asp:Label ID="lb溝通方式Label" runat="server" Text="溝通方式"></asp:Label>
</td>
<td class="datadisplay" colspan="1"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb主題Label" runat="server" Text="主題"></asp:Label>
</td>
<td class="datadisplay" colspan="7"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb內容Label" runat="server" Text="內容"></asp:Label>
</td>
<td class="datadisplay" colspan="7"></td>
</tr>
</table>
</EmptyDataTemplate>
</asp:FormView>
<asp:GridView ID="gv訓練溝通記錄" runat="server" DataKeyNames="編號,訓練課程企劃編號,DB_APPNO"
AutoGenerateColumns="False" EnableModelValidation="True" DataSourceID="ds訓練溝通記錄Grid"
AllowPaging="true" PageSize="10" Width="100%" OnRowDataBound="gv訓練溝通記錄_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:LinkButton ID="btnSelect" runat="server" CausesValidation="False" CommandName="Select" Text=""></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="0" />
</asp:TemplateField>
<asp:TemplateField HeaderText="溝通歷程" SortExpression="溝通歷程">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Dao訓練溝通記錄歷程.GetName(Eval("溝通歷程")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="日期" HeaderText="日期" SortExpression="日期" DataFormatString="{0:yyyyMMdd}" HeaderStyle-Width="6em">
<HeaderStyle Width="5em" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="對象" HeaderText="對象" SortExpression="對象" HeaderStyle-Width="8em" >
</asp:BoundField>
<asp:BoundField DataField="溝通方式" HeaderText="溝通方式" SortExpression="溝通方式" HeaderStyle-Width="8em" >
</asp:BoundField>
<asp:BoundField DataField="主題" HeaderText="主題" SortExpression="主題" />
<asp:TemplateField HeaderText="附件">
<ItemTemplate>
<asp:ObjectDataSource ID="ds訓練溝通記錄附件Grid" runat="server"
DataObjectTypeName="Education.訓練溝通記錄附件Item"
TypeName="Education.DAC_訓練溝通記錄附件"
SelectMethod="SelectBy訓練溝通記錄編號">
<SelectParameters>
<asp:Parameter Name="訓練溝通記錄編號" Type="Int32"></asp:Parameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:DataList runat="server" ID="dl訓練溝通記錄附件"
DataSourceID="ds訓練溝通記錄附件Grid" RepeatDirection="Horizontal" RepeatLayout="Flow" OnItemDataBound="dl訓練溝通記錄附件_ItemDataBound">
<ItemTemplate>
<asp:HyperLink runat="server" ID="hlItem" NavigateUrl="javascript:void(0)">
<div style="display:inline-block">
<asp:Image runat="server" ImageUrl='<%# GetAttachImageUrl(Eval("編號"), Eval("檔案名稱"), Eval("副檔名")) %>' />
<asp:Label runat="server" Text='<%# Eval("標題") %>'></asp:Label>
</div>
</asp:HyperLink>
</ItemTemplate>
</asp:DataList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerTemplate>
<weblib:GridViewPager runat="server" />
</PagerTemplate>
</asp:GridView>
</asp:Panel>
</asp:Content>
@@ -0,0 +1,154 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using WebLib;
using System.Web.Services;
using System.Web.Script.Services;
using System.IO;
namespace Education.Forms.
{
public partial class : FormBase
{
private DAC_訓練溝通記錄 Dao訓練溝通記錄;
private DAC_訓練溝通記錄附件 Dao訓練溝通記錄附件;
protected DAC_訓練溝通記錄歷程 Dao訓練溝通記錄歷程;
private DAC_檔案圖示 Dao檔案圖示;
private string ;
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "課程溝通紀錄";
Dao訓練溝通記錄 = new DAC_訓練溝通記錄(conn);
Dao訓練溝通記錄附件 = new DAC_訓練溝通記錄附件(conn);
Dao訓練溝通記錄歷程 = new DAC_訓練溝通記錄歷程();
Dao檔案圖示 = new DAC_檔案圖示();
= Server.MapPath(Education.PublicVariable.);
Form_View = fv訓練溝通記錄;
Grid_View = gv訓練溝通記錄;
FormView_DataSource = ds訓練溝通記錄Form;
GridView_DataSource = ds訓練溝通記錄Grid;
if (IsPostBack)
{
Grid_View.DataBind();
}
}
protected void ds訓練溝通記錄Form_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練溝通記錄;
}
protected void ds訓練溝通記錄Grid_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練溝通記錄;
}
protected void btn查詢_Click(object sender, EventArgs e)
{
if (. == 0)
{
Panel1.Visible = false;
lbMessage.Text = "請選擇課程企劃";
return;
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
Panel1.Visible = true;
}
}
protected void fv訓練溝通記錄_ItemInserting(object sender, FormViewInsertEventArgs e)
{
e.Values["訓練課程企劃編號"] = .;
}
protected void gv訓練溝通記錄_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
var ds訓練溝通記錄附件Grid = e.Row.Cells[5].FindControl("ds訓練溝通記錄附件Grid") as ObjectDataSource;
var dl訓練溝通記錄附件 = e.Row.Cells[5].FindControl("dl訓練溝通記錄附件") as DataList;
ds訓練溝通記錄附件Grid.SelectParameters["訓練溝通記錄編號"].DefaultValue = (e.Row.DataItem as Item)?..ToString();
dl訓練溝通記錄附件.DataBind();
}
}
protected string GetAttachImageUrl(object o編號, object o檔案名稱, object o副檔名)
{
var = DAC.GetInt32(o編號);
var = DAC.GetString(o檔案名稱);
var = DAC.GetString(o副檔名);
var icon = Dao檔案圖示.GetName(.ToLower());
if (icon == String.Empty)
icon = "file.png";
return ResolveClientUrl($"~/picture/{icon}");
}
protected void dl訓練溝通記錄附件_ItemDataBound(object sender, DataListItemEventArgs e)
{
var hlItem = e.Item.FindControl("hlItem") as HyperLink;
hlItem.Attributes.Add("onclick", $"OpenAttachment({(e.Item.DataItem as 訓練溝通記錄附件Item)?.編號});");
}
protected void fv訓練溝通記錄_DataBound(object sender, EventArgs e)
{
if (fv訓練溝通記錄.CurrentMode == FormViewMode.Insert || fv訓練溝通記錄.CurrentMode == FormViewMode.Edit)
{
var lbReference = fv訓練溝通記錄.FindControl("lbReference") as Label;
if (lbReference != null)
{
if (fv訓練溝通記錄.CurrentMode == FormViewMode.Insert)
{
lbReference.Text = GetData.("1");
}
if (fv訓練溝通記錄.CurrentMode == FormViewMode.Edit)
{
lbReference.Text = GetData.((fv訓練溝通記錄.DataItem as Item)..ToString());
}
}
}
}
[WebMethod(EnableSession = true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string GetReference(string id)
{
return new DAC_GetData().(id);
}
protected void fv訓練溝通記錄_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
int = DAC.GetInt32(e.Keys["編號"]);
var attachList = Dao訓練溝通記錄附件.SelectBy訓練溝通記錄編號();
var path = $"{圖檔儲存路徑}{編號}";
foreach (var item in attachList)
{
Dao訓練溝通記錄附件.DeleteOne(item);
string fileName1 = String.Format("{0}\\{1:000000}.{2}", path, item., item.);
try
{
if (File.Exists(fileName1))
File.Delete(fileName1);
}
catch { }
}
try
{
if (Directory.Exists(path))
Directory.Delete(path);
}
catch { }
}
}
}
@@ -0,0 +1,80 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// 訓練企劃搜尋 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.Common. ;
/// <summary>
/// lbMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessage;
/// <summary>
/// ds訓練溝通記錄Form 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds訓練溝通記錄Form;
/// <summary>
/// ds訓練溝通記錄Grid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds訓練溝通記錄Grid;
/// <summary>
/// Panel1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Panel Panel1;
/// <summary>
/// fv訓練溝通記錄 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView fv訓練溝通記錄;
/// <summary>
/// gv訓練溝通記錄 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv訓練溝通記錄;
}
}
@@ -0,0 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm.Master" AutoEventWireup="true" CodeBehind="溝通記錄編輯.aspx.cs" Inherits="Education.Forms.溝通記錄.溝通記錄編輯" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 變更將會遺失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
}
}
@@ -0,0 +1,113 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm.Master" AutoEventWireup="true" CodeBehind="溝通記錄附件.aspx.cs" Inherits="Education.Forms.溝通記錄.溝通記錄附件" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="CommRecord.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="ds訓練溝通記錄附件Grid" runat="server"
DataObjectTypeName="Education.訓練溝通記錄附件Item"
TypeName="Education.DAC_訓練溝通記錄附件"
SelectMethod="SelectBy訓練溝通記錄編號"
OnObjectCreating="ds訓練溝通記錄附件Grid_ObjectCreating"
UpdateMethod="UpdateOne" DeleteMethod="DeleteOne">
<SelectParameters>
<asp:QueryStringParameter Name="訓練溝通記錄編號" Type="Int32" QueryStringField="id"></asp:QueryStringParameter>
</SelectParameters>
</asp:ObjectDataSource>
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
<tr>
<td class="caption">課程</td>
<td class="datadisplay">
<asp:Label runat="server" ID="lb課程"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">溝通歷程</td>
<td class="datadisplay">
<asp:Label runat="server" ID="lb溝通歷程"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">檢附資料參考</td>
<td class="datadisplay">
<asp:Label runat="server" ID="lb檢附資料參考"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label3" runat="server" Text="標題"></asp:Label></td>
<td class="datainput">
<asp:TextBox ID="txt標題" runat="server" Columns="100" ValidationGroup="insert"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt標題"
CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="請輸入" ValidationGroup="insert"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="Label1" runat="server" Text="檔案上傳"></asp:Label></td>
<td class="datainput">
<asp:FileUpload ID="fu檔案上傳" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="fu檔案上傳"
CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="請選擇要上傳的檔案" OnServerValidate="CustomValidator1_ServerValidate"
ValidateEmptyText="True" ValidationGroup="insert"></asp:CustomValidator>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="datainput">
<asp:LinkButton ID="btnInsert" runat="server" CssClass="button blue80" OnClick="btnInsert_Click"
ValidationGroup="insert">新增</asp:LinkButton>
</td>
</tr>
</table>
<asp:GridView ID="gv訓練溝通記錄附件" runat="server" DataKeyNames="訓練溝通記錄編號,編號,檔案名稱,副檔名,DB_APPNO"
AutoGenerateColumns="False" EnableModelValidation="True" DataSourceID="ds訓練溝通記錄附件Grid"
OnRowDataBound="gv訓練溝通記錄附件_RowDataBound" OnRowDeleting="gv訓練溝通記錄附件_RowDeleting"
Width="100%">
<Columns>
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
CssClass="button blue60" Text="儲存"></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
CssClass="button red60" OnClientClick="return confirm(&quot;是否確定放棄更正?&quot;);"
Text="取消"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
CssClass="button green60" Text="更正"></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
CssClass="button red60" OnClientClick="return confirm(&quot;是否確定刪除此項附件?&quot;);"
Text="刪除"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="140px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="標題" SortExpression="標題">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("標題") %>' CssClass="inputFull"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("標題") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="檔案名稱" HeaderText="檔案名稱" SortExpression="檔案名稱" ReadOnly="true" />
<asp:TemplateField HeaderText="檔案下載">
<ItemTemplate>
<asp:HyperLink runat="server" ID="hlItem" NavigateUrl="javascript:void(0)">
<div style="display:inline-block">
<asp:Image runat="server" ImageUrl='<%# GetAttachImageUrl(Eval("編號"), Eval("檔案名稱"), Eval("副檔名")) %>' />
</div>
</asp:HyperLink>
</ItemTemplate>
<HeaderStyle Width="80px" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Content>
@@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
private int id;
private DAC_檔案圖示 Dao檔案圖示;
private DAC_訓練溝通記錄附件 Dao訓練溝通記錄附件;
private DAC_訓練溝通記錄 Dao訓練溝通記錄;
private string ;
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "溝通紀錄附件管理";
id = DAC.GetInt32(Request["id"]);
Dao檔案圖示 = new DAC_檔案圖示();
Dao訓練溝通記錄附件 = new DAC_訓練溝通記錄附件(conn);
Dao訓練溝通記錄 = new DAC_訓練溝通記錄(conn);
= Server.MapPath(Education.PublicVariable.);
RegisterPostbackTrigger(btnInsert);
if (!IsPostBack)
{
var = Dao訓練溝通記錄.SelectOne(id).FirstOrDefault();
if ( != null)
{
var = new DAC_訓練課程企劃().SelectOne(.).FirstOrDefault();
if ( != null)
lb課程.Text = $"[{訓練課程企劃.顯示編號}] [{訓練課程企劃.訓練日期, 0:yyyy-MM-dd}]{訓練課程企劃.訓練名稱}";
lb溝通歷程.Text = new DAC_訓練溝通記錄歷程().GetName(.);
lb檢附資料參考.Text = GetData.(..ToString());
}
}
else
{
gv訓練溝通記錄附件.DataBind();
}
(Master as PopupForm).RefreshOpener = true;
}
protected string GetAttachImageUrl(object o編號, object o檔案名稱, object o副檔名)
{
var = DAC.GetInt32(o編號);
var = DAC.GetString(o檔案名稱);
var = DAC.GetString(o副檔名);
var icon = Dao檔案圖示.GetName(.ToLower());
if (icon == String.Empty)
icon = "file.png";
return ResolveClientUrl($"~/picture/{icon}");
}
protected void gv訓練溝通記錄附件_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
var hlItem = e.Row.Cells[3].FindControl("hlItem") as HyperLink;
hlItem.Attributes.Add("onclick", $"OpenAttachment({(e.Row.DataItem as 訓練溝通記錄附件Item)?.編號});");
}
}
protected void btnInsert_Click(object sender, EventArgs e)
{
if (!IsValid)
return;
var fileName = fu檔案上傳.FileName;
var fileExt = Path.GetExtension(fu檔案上傳.FileName).ToLower();
if (fileExt.StartsWith("."))
fileExt = fileExt.Substring(1);
var newValue = new Item()
{
= id,
= txt標題.Text,
= fileName,
= fileExt,
ContentType = fu檔案上傳.PostedFile.ContentType
};
Dao訓練溝通記錄附件.InsertOne(newValue);
string savePath = String.Format("{0}{1}", , id);
if (!Directory.Exists(savePath))
Directory.CreateDirectory(savePath);
var tFullName = String.Format("{0}\\{1:000000}.{2}", savePath, newValue., fileExt);
fu檔案上傳.PostedFile.SaveAs(tFullName);
gv訓練溝通記錄附件.DataBind();
}
protected void ds訓練溝通記錄附件Grid_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練溝通記錄附件;
}
protected void gv訓練溝通記錄附件_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int = DAC.GetInt32(e.Keys["訓練溝通記錄編號"]);
int = DAC.GetInt32(e.Keys["編號"]);
string = DAC.GetString(e.Keys["副檔名"]);
string fileName1 = String.Format("{0}{1}\\{2:000000}.{3}", , , , );
if (File.Exists(fileName1))
File.Delete(fileName1);
}
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = fu檔案上傳.HasFile;
}
}
}
@@ -0,0 +1,125 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// ds訓練溝通記錄附件Grid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds訓練溝通記錄附件Grid;
/// <summary>
/// lb課程 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb課程;
/// <summary>
/// lb溝通歷程 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb溝通歷程;
/// <summary>
/// lb檢附資料參考 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb檢附資料參考;
/// <summary>
/// Label3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// txt標題 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt標題;
/// <summary>
/// RequiredFieldValidator1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
/// <summary>
/// Label1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// fu檔案上傳 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FileUpload fu檔案上傳;
/// <summary>
/// CustomValidator1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.CustomValidator CustomValidator1;
/// <summary>
/// btnInsert 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnInsert;
/// <summary>
/// gv訓練溝通記錄附件 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv訓練溝通記錄附件;
}
}
@@ -0,0 +1,6 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/PopupForm.Master" AutoEventWireup="true" CodeBehind="附件檢視.aspx.cs"
Inherits="Education.Forms.溝通記錄.附件檢視" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
private int id;
private DAC_訓練溝通記錄附件 Dao訓練溝通記錄附件;
private string ;
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "溝通紀錄附件檢視";
id = DAC.GetInt32(Request["id"]);
Dao訓練溝通記錄附件 = new DAC_訓練溝通記錄附件(conn);
= Server.MapPath(Education.PublicVariable.);
var item = Dao訓練溝通記錄附件.SelectOne(id).FirstOrDefault();
if (item != null)
{
string fileName = String.Format("{0}{1}\\{2:000000}.{3}", , item., item., item.);
string fileName1 = Server.UrlEncode(item.);
Response.ClearHeaders();
Response.Clear();
Response.Expires = 0;
Response.Buffer = true;
Response.AddHeader("Accept-Language", "zh-tw");
Response.AddHeader("content-disposition", String.Format("attachment; filename=\"{0}\"", fileName1));
Response.ContentType = item.ContentType;
Response.WriteFile(fileName);
Response.End();
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More