chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
|
||||
CodeBehind="學員簽到表列印.aspx.cs" Inherits="Education.Forms.辦訓前置作業.學員簽到表列印" %>
|
||||
|
||||
<%@ Register Src="../Common/訓練企劃搜尋.ascx" TagName="訓練企劃搜尋" TagPrefix="uc1" %>
|
||||
|
||||
<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="Select確定報名學員名單" TypeName="Education.DAC_課程報名" OnObjectCreating="ds報名學員_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="訓練課程編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<uc1:訓練企劃搜尋 ID="訓練企劃搜尋" runat="server" 包含已結案="True" OnClick="btn列印_Click"
|
||||
訓練企劃狀態="已簽核未結案" SearchButtonText="列印簽到表" />
|
||||
<asp:Label ID="lbMessage" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using WebLib;
|
||||
|
||||
namespace Education.Forms.辦訓前置作業
|
||||
{
|
||||
public partial class 學員簽到表列印 : FormBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
FunctionName = "學員簽到表列印";
|
||||
lbMessage.Text = "";
|
||||
|
||||
RegisterPostbackTrigger(訓練企劃搜尋.SearchButton);
|
||||
}
|
||||
|
||||
protected void ds已截止未上課_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao訓練課程企劃;
|
||||
}
|
||||
|
||||
protected void ds報名學員_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao課程報名;
|
||||
}
|
||||
|
||||
protected void btn列印_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (訓練企劃搜尋.訓練企劃編號 == 0)
|
||||
{
|
||||
lbMessage.Text = "請選擇課程企劃";
|
||||
return;
|
||||
}
|
||||
|
||||
// 準備資料
|
||||
int 課程企劃Id = 訓練企劃搜尋.訓練企劃編號;
|
||||
|
||||
訓練課程企劃List 課程企劃Data = Dao訓練課程企劃.SelectOne(課程企劃Id);
|
||||
DAC_訓練課程內容 Dao訓練課程內容 = new DAC_訓練課程內容(conn);
|
||||
DataTable 講師Data = Dao訓練課程內容.Select上課講師(課程企劃Id);
|
||||
string 講師 = "";
|
||||
foreach (DataRow r in 講師Data.Rows)
|
||||
{
|
||||
講師 += DAC.GetString(r["講師姓名"]) + "、";
|
||||
}
|
||||
if (講師.Length > 0)
|
||||
講師 = 講師.Substring(0, 講師.Length - 1);
|
||||
DataTable dt = Dao課程報名.Select確定報名學員名單(課程企劃Id);
|
||||
|
||||
if (dt.Rows.Count == 0)
|
||||
{
|
||||
lbMessage.Text = "此課程目前沒有指定必修人員,也沒有選修人員報名,不需列印學員簽到表";
|
||||
return;
|
||||
}
|
||||
|
||||
// 報表產出
|
||||
Report.學員簽到表 report = new Report.學員簽到表();
|
||||
report.公司名稱 = CompanyName;
|
||||
report.訓練日期 = 訓練課程企劃.Get訓練日期Str(課程企劃Data[0].訓練日期, 課程企劃Data[0].訓練日期迄);
|
||||
report.訓練企劃名稱 = 課程企劃Data[0].訓練名稱;
|
||||
report.辦理地點 = GetData.取得選定場地(課程企劃Id).場地名稱;
|
||||
report.講師姓名 = 講師;
|
||||
report.承辦人員 = Dao員工.Get員工姓名(課程企劃Data[0].承辦);
|
||||
report.訓練日期List = Dao訓練課程內容.Select訓練日期List(課程企劃Id);
|
||||
report.data = dt;
|
||||
MemoryStream ms = report.DoReport();
|
||||
ResponseWriteStream(ms, String.Format("{0:yyyyMMdd}_{1}_學員簽到表.xlsx", 課程企劃Data[0].訓練日期, 課程企劃Data[0].訓練名稱));
|
||||
}
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自動產生>
|
||||
// 這段程式碼是由工具產生的。
|
||||
//
|
||||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
||||
// 程式碼,則會遺失變更。
|
||||
// </自動產生>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Education.Forms.辦訓前置作業
|
||||
{
|
||||
|
||||
|
||||
public partial class 學員簽到表列印
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// ds報名學員 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ds報名學員;
|
||||
|
||||
/// <summary>
|
||||
/// 訓練企劃搜尋 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::Education.Forms.Common.訓練企劃搜尋 訓練企劃搜尋;
|
||||
|
||||
/// <summary>
|
||||
/// lbMessage 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbMessage;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
|
||||
CodeBehind="學員行前通知.aspx.cs" Inherits="Education.Forms.辦訓前置作業.學員行前通知" %>
|
||||
|
||||
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
|
||||
<%@ Register Src="../Common/訓練企劃搜尋.ascx" TagName="訓練企劃搜尋" TagPrefix="uc1" %>
|
||||
<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="Select確定報名學員計畫" TypeName="Education.DAC_課程報名" OnObjectCreating="ds報名學員_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="訓練課程編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="ds報名學員" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="Select確定報名學員名單" TypeName="Education.DAC_課程報名" OnObjectCreating="ds報名學員_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="訓練課程編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
<asp:ControlParameter ControlID="ddl計畫" Name="計畫年度編號" PropertyName="SelectedValue"
|
||||
Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<uc1:訓練企劃搜尋 ID="訓練企劃搜尋" runat="server" 包含已結案="True" OnClick="btn查詢_Click"
|
||||
訓練企劃狀態="已簽核未結案" />
|
||||
<asp:Label ID="lbMessage" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
|
||||
<asp:Panel ID="Panel1" runat="server" Visible="false">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label25" runat="server" Text="計畫"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<weblib:WDropDownList ID="ddl計畫" runat="server" DataSourceID="ds計畫" DataTextField="計畫年度名稱"
|
||||
DataValueField="計畫年度編號">
|
||||
</weblib:WDropDownList>
|
||||
<asp:LinkButton ID="btn查詢學員" runat="server" CssClass="button blue100" OnClick="btn查詢學員_Click">查詢學員</asp:LinkButton>
|
||||
<asp:Label ID="lbMessage1" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label22" runat="server" Text="聯絡人姓名"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人" runat="server" MaxLength="30"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label23" runat="server" Text="聯絡人電話"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人電話" runat="server" MaxLength="30" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label24" runat="server" Text="聯絡人Email"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人email" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label11" runat="server" Text="附加檔案"></asp:Label>
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:FileUpload ID="fuAttach" runat="server" Width="400px" /><br />
|
||||
<asp:Label ID="Label26" runat="server" Text="(附件最大 5MB,請於發送之前確認是否已挑選附件!)" Font-Size="10pt"
|
||||
ForeColor="Red"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="captionCenter" colspan="2" style="vertical-align: top">
|
||||
<asp:Label ID="Label10" runat="server" Text="已報名學員"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput" colspan="2">
|
||||
<div style="float: left">
|
||||
<asp:GridView ID="gv學員" runat="server" AutoGenerateColumns="False"
|
||||
DataSourceID="ds報名學員" EnableModelValidation="True"
|
||||
OnDataBound="gv學員_DataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="寄送">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cb寄送" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="員工編號" DataField="學員編號" SortExpression="學員編號">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="姓名" SortExpression="學員姓名">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lb學員姓名" runat="server" Text='<%# Bind("學員姓名") %>'></asp:Label>
|
||||
<asp:HiddenField ID="hf學員編號" runat="server" Value='<%# Bind("學員編號") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="單位" DataField="站別名稱" SortExpression="站別名稱">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField HeaderText="職務" DataField="職務名稱" SortExpression="職務名稱">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="電子郵件">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="txt電子郵件" runat="server" Columns="30" Text='<%# Bind("電子郵件") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="發送狀態">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lb已寄送" runat="server" Text='<%# Eval("通知發送狀態", "{0}") == "Y" ? "已發送" : "" %>'
|
||||
ForeColor="Red"></asp:Label>
|
||||
<asp:HiddenField ID="hf通知發送狀態" runat="server" Value='<%# Bind("通知發送狀態") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 10px">
|
||||
<asp:LinkButton ID="btn全選" runat="server" CssClass="button blue60" OnClick="btn全選_Click"
|
||||
Visible="False">全選</asp:LinkButton><br />
|
||||
<asp:LinkButton ID="btn不選" runat="server" CssClass="button blue60" OnClick="btn不選_Click"
|
||||
Visible="False">不選</asp:LinkButton>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput" colspan="2">
|
||||
<asp:LinkButton ID="btn發送" runat="server" CssClass="button blue120" OnClick="btn發送_Click"
|
||||
Visible="False">發送行前通知</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
<div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,212 @@
|
||||
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 學員行前通知 : FormBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
FunctionName = "學員行前通知";
|
||||
|
||||
if (IsPostBack)
|
||||
{
|
||||
gv學員.DataBind();
|
||||
}
|
||||
|
||||
RegisterPostbackTrigger(btn發送);
|
||||
}
|
||||
|
||||
protected void btn查詢_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (訓練企劃搜尋.訓練企劃編號 == 0)
|
||||
{
|
||||
Panel1.Visible = false;
|
||||
lbMessage.Text = "請選擇課程企劃";
|
||||
return;
|
||||
}
|
||||
|
||||
Get課程資料();
|
||||
ddl計畫.DataBind();
|
||||
}
|
||||
|
||||
protected void btn查詢學員_Click(object sender, EventArgs e)
|
||||
{
|
||||
gv學員.DataBind();
|
||||
}
|
||||
|
||||
protected void gv學員_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
btn全選.Visible = gv學員.Rows.Count > 0;
|
||||
btn不選.Visible = btn全選.Visible;
|
||||
btn發送.Visible = btn全選.Visible;
|
||||
|
||||
SetSelected(true, true);
|
||||
}
|
||||
|
||||
private void Get課程資料()
|
||||
{
|
||||
int 課程企劃id = 訓練企劃搜尋.訓練企劃編號;
|
||||
訓練課程企劃List 訓練課程企劃 = Dao訓練課程企劃.SelectOne(課程企劃id);
|
||||
|
||||
if (訓練課程企劃.Count > 0)
|
||||
{
|
||||
txt聯絡人.Text = Dao員工.Get員工姓名(訓練課程企劃[0].承辦);
|
||||
txt聯絡人電話.Text = Dao員工.Get公司電話(訓練課程企劃[0].承辦);
|
||||
txt聯絡人email.Text = Dao員工.Get電子郵件(訓練課程企劃[0].承辦);
|
||||
|
||||
Panel1.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSelected(bool selected, bool 跳過已寄送過 = false)
|
||||
{
|
||||
foreach (GridViewRow row in gv學員.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
|
||||
CheckBox cb = FindControl<CheckBox>(row.Cells[0], "cb寄送");
|
||||
HiddenField hf = FindControl<HiddenField>(row.Cells[3], "hf通知發送狀態");
|
||||
|
||||
if (cb == null || hf == null)
|
||||
continue;
|
||||
|
||||
cb.Checked = selected;
|
||||
if (selected && 跳過已寄送過 && hf.Value == "Y")
|
||||
cb.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btn全選_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetSelected(true);
|
||||
}
|
||||
|
||||
protected void btn不選_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetSelected(false);
|
||||
}
|
||||
|
||||
protected void btn發送_Click(object sender, EventArgs e)
|
||||
{
|
||||
int 課程企劃id = 訓練企劃搜尋.訓練企劃編號;
|
||||
發送郵件 發送郵件 = new 發送郵件();
|
||||
發送郵件.Context = this.Context;
|
||||
|
||||
訓練課程企劃List 訓練課程企劃 = Dao訓練課程企劃.SelectOne(課程企劃id);
|
||||
|
||||
DAC_訓練課程內容 Dao訓練課程內容 = new DAC_訓練課程內容(conn);
|
||||
訓練課程內容List 課程內容 = Dao訓練課程內容.SelectBy課程企劃(課程企劃id);
|
||||
|
||||
string 場地名稱 = GetData.取得選定場地(課程企劃id).場地名稱;
|
||||
string 公司名稱 = new DAC_公司別().GetName(CompanyId);
|
||||
|
||||
DAC_講師遴選 Dao講師遴選 = new DAC_講師遴選(conn);
|
||||
|
||||
// 拿課程類別來存放講師姓名
|
||||
foreach (訓練課程內容 item in 課程內容)
|
||||
{
|
||||
item.課程類別 = GetData.取得選定講師(item.訓練課程企劃編號, item.課程序號).姓名;
|
||||
}
|
||||
|
||||
// 檢查是否有勾選
|
||||
bool hasChecked = false;
|
||||
foreach (GridViewRow row in gv學員.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
CheckBox cb寄送 = FindControl<CheckBox>(row.Cells[0], "cb寄送");
|
||||
if (cb寄送 == null || !cb寄送.Checked)
|
||||
continue;
|
||||
hasChecked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hasChecked)
|
||||
{
|
||||
ClientShowMessage("請勾選要發送行前通知的學員");
|
||||
return;
|
||||
}
|
||||
|
||||
// 發送學員通知
|
||||
foreach (GridViewRow row in gv學員.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
|
||||
CheckBox cb寄送 = FindControl<CheckBox>(row.Cells[0], "cb寄送");
|
||||
Label 姓名 = FindControl<Label>(row.Cells[1], "lb學員姓名");
|
||||
HiddenField 學員編號 = FindControl<HiddenField>(row.Cells[1], "hf學員編號");
|
||||
TextBox 電子郵件 = FindControl<TextBox>(row.Cells[1], "txt電子郵件");
|
||||
|
||||
if (cb寄送 == null)
|
||||
continue;
|
||||
|
||||
if (cb寄送.Checked)
|
||||
{
|
||||
// 發送行前通知郵件
|
||||
if (fuAttach.HasFile)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
ms.Write(fuAttach.FileBytes, 0, fuAttach.FileBytes.Length);
|
||||
ms.Position = 0;
|
||||
|
||||
發送郵件.發送學員行前通知郵件(姓名.Text, 電子郵件.Text,
|
||||
txt聯絡人.Text, txt聯絡人電話.Text, txt聯絡人email.Text, 公司名稱,
|
||||
訓練課程企劃[0].訓練日期, 訓練課程企劃[0].訓練日期迄, 訓練課程企劃[0].訓練名稱, 場地名稱,
|
||||
訓練課程企劃[0].訓練時數, 課程內容, fuAttach.FileName, ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
發送郵件.發送學員行前通知郵件(姓名.Text, 電子郵件.Text,
|
||||
txt聯絡人.Text, txt聯絡人電話.Text, txt聯絡人email.Text, 公司名稱,
|
||||
訓練課程企劃[0].訓練日期, 訓練課程企劃[0].訓練日期迄, 訓練課程企劃[0].訓練名稱, 場地名稱,
|
||||
訓練課程企劃[0].訓練時數, 課程內容, "", null);
|
||||
}
|
||||
|
||||
// 標記已發送
|
||||
Dao課程報名.標記已發送學員通知(學員編號.Value, 課程企劃id, UserId);
|
||||
}
|
||||
}
|
||||
|
||||
// 發送一份給承辦人存查
|
||||
if (fuAttach.HasFile)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
ms.Write(fuAttach.FileBytes, 0, fuAttach.FileBytes.Length);
|
||||
ms.Position = 0;
|
||||
|
||||
發送郵件.發送學員行前通知郵件(txt聯絡人.Text, txt聯絡人email.Text,
|
||||
txt聯絡人.Text, txt聯絡人電話.Text, txt聯絡人email.Text, 公司名稱,
|
||||
訓練課程企劃[0].訓練日期, 訓練課程企劃[0].訓練日期迄, 訓練課程企劃[0].訓練名稱, 場地名稱,
|
||||
訓練課程企劃[0].訓練時數, 課程內容, fuAttach.FileName, ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
發送郵件.發送學員行前通知郵件(txt聯絡人.Text, txt聯絡人email.Text,
|
||||
txt聯絡人.Text, txt聯絡人電話.Text, txt聯絡人email.Text, 公司名稱,
|
||||
訓練課程企劃[0].訓練日期, 訓練課程企劃[0].訓練日期迄, 訓練課程企劃[0].訓練名稱,
|
||||
場地名稱, 訓練課程企劃[0].訓練時數, 課程內容, "", null);
|
||||
}
|
||||
gv學員.DataBind();
|
||||
ClientShowMessage("學員行前通知發送完畢");
|
||||
}
|
||||
|
||||
protected void ds已截止未上課_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao訓練課程企劃;
|
||||
}
|
||||
|
||||
protected void ds報名學員_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao課程報名;
|
||||
}
|
||||
}
|
||||
}
|
||||
+224
@@ -0,0 +1,224 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自動產生>
|
||||
// 這段程式碼是由工具產生的。
|
||||
//
|
||||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
||||
// 程式碼,則會遺失變更。
|
||||
// </自動產生>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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>
|
||||
/// 訓練企劃搜尋 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::Education.Forms.Common.訓練企劃搜尋 訓練企劃搜尋;
|
||||
|
||||
/// <summary>
|
||||
/// lbMessage 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbMessage;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Label25 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label25;
|
||||
|
||||
/// <summary>
|
||||
/// ddl計畫 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::WebLib.WDropDownList ddl計畫;
|
||||
|
||||
/// <summary>
|
||||
/// btn查詢學員 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton btn查詢學員;
|
||||
|
||||
/// <summary>
|
||||
/// lbMessage1 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbMessage1;
|
||||
|
||||
/// <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>
|
||||
/// Label23 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label23;
|
||||
|
||||
/// <summary>
|
||||
/// txt聯絡人電話 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt聯絡人電話;
|
||||
|
||||
/// <summary>
|
||||
/// Label24 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label24;
|
||||
|
||||
/// <summary>
|
||||
/// txt聯絡人email 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt聯絡人email;
|
||||
|
||||
/// <summary>
|
||||
/// Label11 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label11;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttach 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.FileUpload fuAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Label26 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label26;
|
||||
|
||||
/// <summary>
|
||||
/// Label10 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label10;
|
||||
|
||||
/// <summary>
|
||||
/// gv學員 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gv學員;
|
||||
|
||||
/// <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>
|
||||
/// btn發送 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton btn發送;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
<%@ 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">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<asp:ObjectDataSource ID="ds計畫" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="Select確定報名學員計畫" TypeName="Education.DAC_課程報名" OnObjectCreating="ds報名學員_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="訓練課程編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="ds報名學員" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="Select確定報名學員名單" TypeName="Education.DAC_課程報名" OnObjectCreating="ds報名學員_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="訓練課程編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
<asp:ControlParameter ControlID="ddl計畫" Name="計畫年度編號" PropertyName="SelectedValue"
|
||||
Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="ds異動通知" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="Select訓練課程企劃" TypeName="Education.DAC_訓練課程異動通知" OnObjectCreating="ds異動通知_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<uc1:訓練企劃搜尋 ID="訓練企劃搜尋" runat="server" 包含已結案="True" OnClick="btn查詢_Click"
|
||||
訓練企劃狀態="已簽核未結案" />
|
||||
<asp:Label ID="lbMessage" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
|
||||
<asp:Panel ID="Panel1" runat="server" Visible="false">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label27" runat="server" Text="計畫"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<weblib:WDropDownList ID="ddl計畫" runat="server" DataSourceID="ds計畫" DataTextField="計畫年度名稱"
|
||||
DataValueField="計畫年度編號">
|
||||
</weblib:WDropDownList>
|
||||
<asp:LinkButton ID="btn查詢學員" runat="server" CssClass="button blue100" OnClick="btn查詢學員_Click">查詢學員</asp:LinkButton>
|
||||
<asp:Label ID="lbMessage1" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
|
||||
</td>
|
||||
<td class="datainput"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label22" runat="server" Text="聯絡人姓名"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人" runat="server" MaxLength="30"></asp:TextBox>
|
||||
</td>
|
||||
<td class="datainput"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label23" runat="server" Text="聯絡人電話"></asp:Label></td>
|
||||
<td class="datainput" colspan="2">
|
||||
<asp:TextBox ID="txt聯絡人電話" runat="server" MaxLength="30" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td class="datainput"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label24" runat="server" Text="聯絡人Email"></asp:Label></td>
|
||||
<td class="datainput" colspan="2">
|
||||
<asp:TextBox ID="txt聯絡人email" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td class="datainput"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label10" runat="server" Text="異動通知內容"></asp:Label></td>
|
||||
<td class="datainput" colspan="2">
|
||||
<asp:TextBox ID="txt通知內容" runat="server" Columns="80" Rows="15" TextMode="MultiLine"
|
||||
CssClass="inputFull" MaxLength="500"></asp:TextBox>
|
||||
</td>
|
||||
<td style="vertical-align: top">
|
||||
<asp:LinkButton ID="btn發送" runat="server" CssClass="button blue120" OnClick="btn發送_Click">發送新異動通知</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="captionCenter" colspan="2" style="vertical-align: top">
|
||||
<asp:Label ID="Label25" runat="server" Text="已發送異動通知"></asp:Label>
|
||||
</td>
|
||||
<td class="captionCenter" style="vertical-align: top; height: 28px;">
|
||||
<asp:Label ID="Label1" runat="server" Text="已報名學員"></asp:Label>
|
||||
<asp:LinkButton ID="btn全選" runat="server" CssClass="button blue60" OnClick="btn全選_Click">全選</asp:LinkButton>
|
||||
<asp:LinkButton ID="btn不選" runat="server" CssClass="button blue60" OnClick="btn不選_Click">不選</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput" colspan="2" style="vertical-align: top">
|
||||
<asp:GridView ID="gv異動通知" runat="server" AutoGenerateColumns="False" DataKeyNames="編號,異動通知項次"
|
||||
DataSourceID="ds異動通知" EnableModelValidation="True" OnSelectedIndexChanged="gv異動通知_SelectedIndexChanged"
|
||||
OnRowCommand="gv異動通知_RowCommand">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="異動通知項次" HeaderText="項次" ReadOnly="True" SortExpression="異動通知項次">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="異動通知日期" DataFormatString="{0:yyyy-MM-dd}" HeaderText="通知日期"
|
||||
SortExpression="異動通知日期" />
|
||||
<asp:TemplateField HeaderText="通知內容" SortExpression="異動通知內容">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("異動通知內容") %>'></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkButton4" runat="server" OnClientClick='<%# GetOpenWindowJS("../Common/ShowContent.aspx", "_content", "type", "CourseChange", "id", Eval("編號"), "item", Eval("異動通知項次")) %>'
|
||||
Text='<%# Eval("異動通知內容", "{0}").Length > 10 ? Eval("異動通知內容", "{0}").Substring(0, 10) + "..." : Eval("異動通知內容", "{0}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkButton2" runat="server" CssClass="button blue120" CommandName="Select">查詢發送狀態</asp:LinkButton>
|
||||
<asp:LinkButton ID="LinkButton3" runat="server" CssClass="button red100" CommandName="ReSend"
|
||||
CommandArgument='<%# Eval("異動通知項次") %>'>重新發送</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
<td class="datainput" style="vertical-align: top">
|
||||
<asp:GridView ID="gv學員" runat="server" AutoGenerateColumns="False" DataSourceID="ds報名學員"
|
||||
EnableModelValidation="True" OnDataBound="gv學員_DataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="寄送">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cb寄送" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="員工編號" DataField="學員編號" SortExpression="學員編號">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="學員姓名">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lb學員姓名" runat="server" Text='<%# Bind("學員姓名") %>'></asp:Label>
|
||||
<asp:HiddenField ID="hf學員編號" runat="server" Value='<%# Bind("學員編號") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="單位" DataField="站別名稱" SortExpression="站別名稱">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField HeaderText="職務" DataField="職務名稱" SortExpression="職務名稱">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="電子郵件">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="txt電子郵件" runat="server" Columns="30" Text='<%# Bind("電子郵件") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="行前通知<br>發送狀態">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lb已寄送" runat="server" Text='<%# Eval("通知發送狀態", "{0}") == "Y" ? "已發送" : "" %>'
|
||||
ForeColor="Red"></asp:Label>
|
||||
<asp:HiddenField ID="hf通知發送狀態" runat="server" Value='<%# Bind("通知發送狀態") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="異動通知<br>發送狀態">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label26" runat="server" ForeColor="Red" Text='<%# Get異動通知發送狀態(Eval("學員編號")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,243 @@
|
||||
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 DAC_訓練課程異動通知 Dao訓練課程異動通知;
|
||||
private DAC_訓練課程異動通知發送紀錄 Dao訓練課程異動通知發送紀錄;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
FunctionName = "學員課程異動通知";
|
||||
Dao訓練課程異動通知 = new DAC_訓練課程異動通知(conn);
|
||||
Dao訓練課程異動通知發送紀錄 = new DAC_訓練課程異動通知發送紀錄(conn);
|
||||
|
||||
if (IsPostBack)
|
||||
{
|
||||
gv異動通知.DataBind();
|
||||
gv學員.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_LoadComplete(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected void btn查詢_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (訓練企劃搜尋.訓練企劃編號 == 0)
|
||||
{
|
||||
Panel1.Visible = false;
|
||||
lbMessage.Text = "請選擇課程企劃";
|
||||
return;
|
||||
}
|
||||
Get課程資料();
|
||||
ddl計畫.DataBind();
|
||||
}
|
||||
|
||||
protected void btn查詢學員_Click(object sender, EventArgs e)
|
||||
{
|
||||
gv學員.DataBind();
|
||||
gv異動通知.DataBind();
|
||||
}
|
||||
|
||||
private void Get課程資料()
|
||||
{
|
||||
int 課程企劃id = 訓練企劃搜尋.訓練企劃編號;
|
||||
訓練課程企劃List 訓練課程企劃 = Dao訓練課程企劃.SelectOne(課程企劃id);
|
||||
|
||||
if (訓練課程企劃.Count > 0)
|
||||
{
|
||||
txt聯絡人.Text = Dao員工.Get員工姓名(訓練課程企劃[0].承辦);
|
||||
txt聯絡人電話.Text = Dao員工.Get公司電話(訓練課程企劃[0].承辦);
|
||||
txt聯絡人email.Text = Dao員工.Get電子郵件(訓練課程企劃[0].承辦);
|
||||
|
||||
Panel1.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btn發送_Click(object sender, EventArgs e)
|
||||
{
|
||||
發送通知郵件(0, 0, txt通知內容.Text, true);
|
||||
|
||||
gv異動通知.DataBind();
|
||||
if (gv異動通知.Rows.Count > 0)
|
||||
gv異動通知.SelectedIndex = gv異動通知.Rows.Count - 1;
|
||||
gv異動通知_SelectedIndexChanged(sender, e);
|
||||
|
||||
ClientShowMessage("學員課程異動通知發送完畢");
|
||||
}
|
||||
|
||||
private void 發送通知郵件(int 編號, int 異動通知項次, string 通知內容, bool 新通知)
|
||||
{
|
||||
int 課程企劃id = 訓練企劃搜尋.訓練企劃編號;
|
||||
發送郵件 發送郵件 = new 發送郵件();
|
||||
發送郵件.Context = this.Context;
|
||||
|
||||
訓練課程企劃List 訓練課程企劃 = Dao訓練課程企劃.SelectOne(課程企劃id);
|
||||
|
||||
string 場地名稱 = GetData.取得選定場地(課程企劃id).場地名稱;
|
||||
string 公司名稱 = new DAC_公司別().GetName(CompanyId);
|
||||
|
||||
// 檢查是否有勾選
|
||||
bool hasChecked = false;
|
||||
foreach (GridViewRow row in gv學員.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
CheckBox cb寄送 = FindControl<CheckBox>(row.Cells[0], "cb寄送");
|
||||
if (cb寄送 == null || !cb寄送.Checked)
|
||||
continue;
|
||||
hasChecked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hasChecked)
|
||||
{
|
||||
ClientShowMessage("請勾選要發送異動通知的學員");
|
||||
return;
|
||||
}
|
||||
|
||||
if (新通知)
|
||||
{
|
||||
訓練課程異動通知 newValue = new 訓練課程異動通知();
|
||||
newValue.編號 = 訓練企劃搜尋.訓練企劃編號;
|
||||
newValue.異動通知日期 = DateTime.UtcNow.AddHours(8).Date;
|
||||
newValue.異動通知內容 = 通知內容;
|
||||
newValue.DB_CRUSR = UserId;
|
||||
Dao訓練課程異動通知.InsertOne(newValue);
|
||||
編號 = newValue.編號;
|
||||
異動通知項次 = newValue.異動通知項次;
|
||||
}
|
||||
|
||||
// 發送學員通知
|
||||
foreach (GridViewRow row in gv學員.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
|
||||
CheckBox cb寄送 = FindControl<CheckBox>(row.Cells[0], "cb寄送");
|
||||
Label 姓名 = FindControl<Label>(row.Cells[1], "lb學員姓名");
|
||||
HiddenField 學員編號 = FindControl<HiddenField>(row.Cells[1], "hf學員編號");
|
||||
TextBox 電子郵件 = FindControl<TextBox>(row.Cells[1], "txt電子郵件");
|
||||
|
||||
if (cb寄送 == null)
|
||||
continue;
|
||||
|
||||
if (cb寄送.Checked)
|
||||
{
|
||||
發送郵件.發送學員異動通知郵件(姓名.Text, 電子郵件.Text,
|
||||
txt聯絡人.Text, txt聯絡人電話.Text, txt聯絡人email.Text, 公司名稱,
|
||||
訓練課程企劃[0].訓練日期, 訓練課程企劃[0].訓練日期迄, 訓練課程企劃[0].訓練名稱, 場地名稱,
|
||||
訓練課程企劃[0].訓練時數, 通知內容);
|
||||
|
||||
// 標記已發送
|
||||
Dao訓練課程異動通知發送紀錄.標記已發送(編號, 異動通知項次, 學員編號.Value, UserId);
|
||||
}
|
||||
}
|
||||
|
||||
發送郵件.發送學員異動通知郵件(txt聯絡人.Text, txt聯絡人email.Text,
|
||||
txt聯絡人.Text, txt聯絡人電話.Text, txt聯絡人email.Text, 公司名稱,
|
||||
訓練課程企劃[0].訓練日期, 訓練課程企劃[0].訓練日期迄, 訓練課程企劃[0].訓練名稱,
|
||||
場地名稱, 訓練課程企劃[0].訓練時數, 通知內容);
|
||||
}
|
||||
|
||||
protected void ds已截止未上課_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao訓練課程企劃;
|
||||
}
|
||||
|
||||
protected void ds報名學員_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao課程報名;
|
||||
}
|
||||
|
||||
protected void ds異動通知_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao訓練課程異動通知;
|
||||
}
|
||||
|
||||
protected void gv學員_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
private void SetSelected(bool selected, bool 跳過已寄送過 = false)
|
||||
{
|
||||
foreach (GridViewRow row in gv學員.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
|
||||
CheckBox cb = FindControl<CheckBox>(row.Cells[0], "cb寄送");
|
||||
HiddenField hf = FindControl<HiddenField>(row.Cells[3], "hf通知發送狀態");
|
||||
|
||||
if (cb == null || hf == null)
|
||||
continue;
|
||||
|
||||
cb.Checked = selected;
|
||||
if (selected && 跳過已寄送過 && hf.Value == "Y")
|
||||
cb.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btn全選_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetSelected(true);
|
||||
}
|
||||
|
||||
protected void btn不選_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetSelected(false);
|
||||
}
|
||||
|
||||
protected string Get異動通知發送狀態(object 學員編號)
|
||||
{
|
||||
if (gv異動通知.SelectedDataKey != null)
|
||||
{
|
||||
if (Dao訓練課程異動通知發送紀錄.是否已發送(DAC.GetInt32(gv異動通知.SelectedDataKey["編號"]),
|
||||
DAC.GetInt32(gv異動通知.SelectedDataKey["異動通知項次"]),
|
||||
DAC.GetString(學員編號)))
|
||||
return "已發送";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected void gv異動通知_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gv學員.DataBind();
|
||||
}
|
||||
|
||||
protected void gv異動通知_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
訓練課程異動通知List d = Dao訓練課程異動通知.SelectOne(訓練企劃搜尋.訓練企劃編號,
|
||||
DAC.GetInt32(e.CommandArgument));
|
||||
|
||||
if (d.Count > 0)
|
||||
{
|
||||
發送通知郵件(訓練企劃搜尋.訓練企劃編號, DAC.GetInt32(e.CommandArgument),
|
||||
d[0].異動通知內容, false);
|
||||
|
||||
for (int i=0; i< gv異動通知.DataKeys.Count; i++)
|
||||
{
|
||||
DataKey k = gv異動通知.DataKeys[i];
|
||||
if (DAC.GetInt32(k[1]) == DAC.GetInt32(e.CommandArgument))
|
||||
{
|
||||
gv異動通知.SelectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gv學員.DataBind();
|
||||
ClientShowMessage("學員課程異動通知發送完畢");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自動產生>
|
||||
// 這段程式碼是由工具產生的。
|
||||
//
|
||||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
||||
// 程式碼,則會遺失變更。
|
||||
// </自動產生>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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>
|
||||
/// ds異動通知 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ds異動通知;
|
||||
|
||||
/// <summary>
|
||||
/// 訓練企劃搜尋 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::Education.Forms.Common.訓練企劃搜尋 訓練企劃搜尋;
|
||||
|
||||
/// <summary>
|
||||
/// lbMessage 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbMessage;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Label27 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label27;
|
||||
|
||||
/// <summary>
|
||||
/// ddl計畫 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::WebLib.WDropDownList ddl計畫;
|
||||
|
||||
/// <summary>
|
||||
/// btn查詢學員 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton btn查詢學員;
|
||||
|
||||
/// <summary>
|
||||
/// lbMessage1 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbMessage1;
|
||||
|
||||
/// <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>
|
||||
/// Label23 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label23;
|
||||
|
||||
/// <summary>
|
||||
/// txt聯絡人電話 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt聯絡人電話;
|
||||
|
||||
/// <summary>
|
||||
/// Label24 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label24;
|
||||
|
||||
/// <summary>
|
||||
/// txt聯絡人email 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt聯絡人email;
|
||||
|
||||
/// <summary>
|
||||
/// Label10 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label10;
|
||||
|
||||
/// <summary>
|
||||
/// txt通知內容 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt通知內容;
|
||||
|
||||
/// <summary>
|
||||
/// btn發送 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton btn發送;
|
||||
|
||||
/// <summary>
|
||||
/// Label25 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label25;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <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>
|
||||
/// gv異動通知 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gv異動通知;
|
||||
|
||||
/// <summary>
|
||||
/// gv學員 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gv學員;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
|
||||
CodeBehind="講師行前通知.aspx.cs" Inherits="Education.Forms.辦訓前置作業.講師行前通知" %>
|
||||
|
||||
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="cc1" %>
|
||||
<%@ Register Src="../Common/訓練企劃搜尋.ascx" TagName="訓練企劃搜尋" TagPrefix="uc1" %>
|
||||
|
||||
<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="Select上課講師" TypeName="Education.DAC_訓練課程內容" OnObjectCreating="ds上課講師_ObjectCreating">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="訓練企劃搜尋" Name="訓練課程企劃編號" PropertyName="訓練企劃編號"
|
||||
Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<uc1:訓練企劃搜尋 ID="訓練企劃搜尋" runat="server" 包含已結案="True" OnClick="btn查詢_Click"
|
||||
訓練企劃狀態="已簽核未結案" />
|
||||
<asp:Label ID="lbMessage" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
|
||||
<asp:Panel ID="Panel1" runat="server" Visible="false">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label21" runat="server" Text="訓練地點"></asp:Label></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:Label ID="Label25" runat="server" Text="地點"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt訓練地點名稱" runat="server" Columns="80" MaxLength="100"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:Label ID="Label26" runat="server" Text="地址"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt訓練地點地址" runat="server" Columns="80" MaxLength="100"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:Label ID="Label27" runat="server" Text="交通圖"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:FileUpload ID="fuAttach" runat="server" Width="500px" /><br />
|
||||
<asp:Label ID="Label29" runat="server" Text="(附件最大 5MB,請於發送之前確認是否已挑選附件!)" Font-Size="10pt"
|
||||
ForeColor="Red"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label22" runat="server" Text="聯絡人姓名"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人" runat="server" MaxLength="30"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label23" runat="server" Text="聯絡人電話"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人電話" runat="server" Columns="50" MaxLength="30"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label24" runat="server" Text="聯絡人Email"></asp:Label></td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt聯絡人email" runat="server" Columns="50" MaxLength="50"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label11" runat="server" Text="講師攜帶設備"></asp:Label></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb攜帶設備_筆記型電腦" runat="server" Text="筆記型電腦" />
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb攜帶設備_課程簡報檔" runat="server" Text="課程簡報檔" />
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb攜帶設備_其他" runat="server" Text="其他" />
|
||||
<asp:TextBox ID="txt攜帶設備_其他" runat="server" Columns="50"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label12" runat="server" Text="場地設備"></asp:Label></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_投影機" runat="server" Text="投影機" />
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_麥克風" runat="server" Text="麥克風" />
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_雷射筆" runat="server" Text="雷射筆" />
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_筆記型電腦" runat="server" Text="筆記型電腦" />
|
||||
</td>
|
||||
<td style="width: 300px"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_座位安排" runat="server" Text="座位安排" />
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_白紙" runat="server" Text="白紙" />
|
||||
</td>
|
||||
<td colspan="3" class="datainput">
|
||||
<asp:CheckBox ID="cb場地設備_其他" runat="server" Text="其他" />
|
||||
<asp:TextBox ID="txt場地設備_其他" runat="server" Columns="50"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">
|
||||
<asp:Label ID="Label14" runat="server" Text="其他"></asp:Label></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb其他_交通安排" runat="server" Text="交通安排" />
|
||||
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt交通安排" runat="server" Columns="50"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb其他_用餐" runat="server" Text="用餐" />
|
||||
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:TextBox ID="txt用餐" runat="server" Columns="50"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="captionCenter" style="" colspan="2">
|
||||
<asp:Label ID="Label10" runat="server" Text="上課講師"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput" colspan="2">
|
||||
<asp:GridView ID="gv講師" runat="server" AutoGenerateColumns="False" DataSourceID="ds上課講師"
|
||||
EnableModelValidation="True" OnDataBound="gv講師_DataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="要發送">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cb要發送" runat="server" />
|
||||
<asp:HiddenField ID="hf課程序號" runat="server" Value='<%# Bind("課程序號") %>' />
|
||||
<asp:HiddenField ID="hf訓練日期" runat="server" Value='<%# Bind("訓練日期") %>' />
|
||||
<asp:HiddenField ID="hf時間起" runat="server" Value='<%# Bind("時間起") %>' />
|
||||
<asp:HiddenField ID="hf時間迄" runat="server" Value='<%# Bind("時間迄") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="講師姓名">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lb講師姓名" runat="server" Text='<%# Bind("講師姓名") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="電子郵件">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="txt電子郵件" runat="server" Text='<%# Bind("電子郵件") %>' Columns="30"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="發送狀態">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label28" runat="server" ForeColor="Red" Text='<%# Eval("通知發送狀態", "{0}") == "Y" ? "已發送" : "" %>'
|
||||
EnableViewState="False"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="講酬給付">
|
||||
<ItemTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb酬勞_講師費" runat="server" Text="講師費" />
|
||||
<asp:TextBox ID="txt講師費" runat="server" Columns="8" MaxLength="5"></asp:TextBox>
|
||||
<asp:Label ID="Label15" runat="server" Text="元/小時"></asp:Label>
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:CheckBox ID="cb酬勞_交通費" runat="server" Text="交通費" />
|
||||
<asp:TextBox ID="txt交通費" runat="server" Columns="8" MaxLength="5"></asp:TextBox>
|
||||
<asp:Label ID="Label16" runat="server" Text="元/趟"></asp:Label>
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:Label ID="Label17" runat="server" Text="合計:"></asp:Label>
|
||||
<asp:TextBox ID="txt費用合計" runat="server" Columns="8" MaxLength="6"></asp:TextBox>
|
||||
<asp:Label ID="Label19" runat="server" Text="元整"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datainput">
|
||||
<asp:Label ID="Label18" runat="server" Text="給付方式:"></asp:Label>
|
||||
<asp:RadioButtonList ID="cb給付方式" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Text="現金 " Value="現金" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="匯款 " Value="匯款"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
<td class="datainput">
|
||||
<asp:Label ID="Label20" runat="server" Text="給付日:"></asp:Label>
|
||||
<cc1:DateTextBox ID="txt給付日" runat="server" />
|
||||
</td>
|
||||
<td class="datainput"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:LinkButton ID="btn發送" runat="server" CssClass="button blue120" OnClick="btn發送_Click">發送行前通知</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,207 @@
|
||||
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 講師行前通知 : FormBase
|
||||
{
|
||||
private DAC_訓練課程內容 Dao訓練課程內容;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
FunctionName = "講師行前通知";
|
||||
Dao訓練課程內容 = new DAC_訓練課程內容(conn);
|
||||
|
||||
if (IsPostBack)
|
||||
{
|
||||
gv講師.DataBind();
|
||||
}
|
||||
|
||||
RegisterPostbackTrigger(btn發送);
|
||||
}
|
||||
|
||||
protected void btn查詢_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (訓練企劃搜尋.訓練企劃編號 == 0)
|
||||
{
|
||||
Panel1.Visible = false;
|
||||
lbMessage.Text = "請選擇課程企劃";
|
||||
return;
|
||||
}
|
||||
|
||||
gv講師.DataBind();
|
||||
Get課程資料();
|
||||
}
|
||||
|
||||
protected void btn發送_Click(object sender, EventArgs e)
|
||||
{
|
||||
int 課程企劃id = 訓練企劃搜尋.訓練企劃編號;
|
||||
發送郵件 發送郵件 = new 發送郵件();
|
||||
發送郵件.Context = this.Context;
|
||||
|
||||
訓練課程企劃List 訓練課程企劃 = Dao訓練課程企劃.SelectOne(課程企劃id);
|
||||
string 場地名稱 = GetData.取得選定場地(課程企劃id).場地名稱;
|
||||
|
||||
// 檢查是否有勾選
|
||||
bool hasChecked = false;
|
||||
foreach (GridViewRow row in gv講師.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
CheckBox cb要發送 = FindControl<CheckBox>(row.Cells[0], "cb要發送");
|
||||
if (cb要發送 == null || !cb要發送.Checked)
|
||||
continue;
|
||||
hasChecked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hasChecked)
|
||||
{
|
||||
ClientShowMessage("請勾選要發送行前通知的講師");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (GridViewRow row in gv講師.Rows)
|
||||
{
|
||||
if (row.RowType != DataControlRowType.DataRow)
|
||||
continue;
|
||||
|
||||
CheckBox cb要發送 = FindControl<CheckBox>(row.Cells[0], "cb要發送");
|
||||
HiddenField hf課程序號 = FindControl<HiddenField>(row.Cells[0], "hf課程序號");
|
||||
HiddenField hf訓練日期 = FindControl<HiddenField>(row.Cells[0], "hf訓練日期");
|
||||
HiddenField hf時間起 = FindControl<HiddenField>(row.Cells[0], "hf時間起");
|
||||
HiddenField hf時間迄 = FindControl<HiddenField>(row.Cells[0], "hf時間迄");
|
||||
Label lb講師姓名 = FindControl<Label>(row.Cells[1], "lb講師姓名");
|
||||
TextBox txt電子郵件 = FindControl<TextBox>(row.Cells[2], "txt電子郵件");
|
||||
CheckBox cb酬勞_講師費 = FindControl<CheckBox>(row.Cells[4], "cb酬勞_講師費");
|
||||
CheckBox cb酬勞_交通費 = FindControl<CheckBox>(row.Cells[4], "cb酬勞_交通費");
|
||||
RadioButtonList rb給付方式 = FindControl<RadioButtonList>(row.Cells[4], "cb給付方式");
|
||||
TextBox txt講師費 = FindControl<TextBox>(row.Cells[4], "txt講師費");
|
||||
TextBox txt交通費 = FindControl<TextBox>(row.Cells[4], "txt交通費");
|
||||
TextBox txt費用合計 = FindControl<TextBox>(row.Cells[4], "txt費用合計");
|
||||
DateTextBox txt給付日 = FindControl<DateTextBox>(row.Cells[4], "txt給付日");
|
||||
|
||||
DateTime 備課時間 = new DateTime();
|
||||
try
|
||||
{
|
||||
備課時間 = new DateTime(2000, 1, 1, DAC.GetInt32(hf時間起.Value.Substring(0, 2)),
|
||||
DAC.GetInt32(hf時間起.Value.Substring(hf時間起.Value.Length - 2, 2)), 0).AddMinutes(-20);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
if (cb要發送 == null)
|
||||
continue;
|
||||
|
||||
if (cb要發送.Checked)
|
||||
{
|
||||
講師行前郵件Data 講師行前郵件Data = new 講師行前郵件Data(){
|
||||
收件人姓名 = lb講師姓名.Text,
|
||||
收件人Email = txt電子郵件.Text,
|
||||
聯絡人姓名 = txt聯絡人.Text,
|
||||
聯絡人電話 = txt聯絡人電話.Text,
|
||||
聯絡人Email = txt聯絡人email.Text,
|
||||
公司名稱 = CompanyName,
|
||||
// 訓練日期 = 訓練課程企劃[0].訓練日期,
|
||||
// 訓練日期迄 = 訓練課程企劃[0].訓練日期迄,
|
||||
訓練日期 = DAC.GetDateTime(hf訓練日期.Value),
|
||||
訓練日期迄 = new DateTime(),
|
||||
訓練時間 = hf時間起.Value,
|
||||
訓練時間迄 = hf時間迄.Value,
|
||||
備課時間 = 備課時間.Ticks > 0 ? 備課時間.ToString("HH:mm") : hf時間起.Value,
|
||||
訓練名稱 = 訓練課程企劃[0].訓練名稱,
|
||||
訓練地點 = txt訓練地點名稱.Text,
|
||||
訓練地址 = txt訓練地點地址.Text,
|
||||
是否攜帶筆電 = cb攜帶設備_筆記型電腦.Checked,
|
||||
是否攜帶簡報 = cb攜帶設備_課程簡報檔.Checked,
|
||||
是否攜帶其他 = cb攜帶設備_其他.Checked,
|
||||
攜帶其他 = txt攜帶設備_其他.Text,
|
||||
是否場地投影機 = cb場地設備_投影機.Checked,
|
||||
是否場地麥克風 = cb場地設備_麥克風.Checked,
|
||||
是否場地雷射筆 = cb場地設備_雷射筆.Checked,
|
||||
是否場地筆電 = cb場地設備_筆記型電腦.Checked,
|
||||
是否場地座位安排 = cb場地設備_座位安排.Checked,
|
||||
是否場地白紙 = cb場地設備_白紙.Checked,
|
||||
是否場地其他 = cb場地設備_其他.Checked,
|
||||
場地其他 = txt場地設備_其他.Text,
|
||||
是否講師費 = cb酬勞_講師費.Checked,
|
||||
講師費 = txt講師費.Text,
|
||||
是否交通費 = cb酬勞_交通費.Checked,
|
||||
交通費 = txt交通費.Text,
|
||||
合計 = txt費用合計.Text,
|
||||
是否現金 = rb給付方式.SelectedValue == "現金",
|
||||
是否匯款 = rb給付方式.SelectedValue == "匯款",
|
||||
給付日 = txt給付日.Value.HasValue ? txt給付日.Value.Value : new DateTime(),
|
||||
是否交通安排 = cb其他_交通安排.Checked,
|
||||
交通安排 = txt交通安排.Text,
|
||||
是否用餐 = cb其他_用餐.Checked,
|
||||
用餐 = txt用餐.Text };
|
||||
|
||||
// 發送行前通知郵件
|
||||
if (fuAttach.HasFile)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
ms.Write(fuAttach.FileBytes, 0, fuAttach.FileBytes.Length);
|
||||
ms.Position = 0;
|
||||
|
||||
講師行前郵件Data.附件檔名 = fuAttach.FileName;
|
||||
講師行前郵件Data.附件內容 = ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
講師行前郵件Data.附件檔名 = "";
|
||||
講師行前郵件Data.附件內容 = null;
|
||||
}
|
||||
|
||||
發送郵件.發送講師行前通知郵件(講師行前郵件Data);
|
||||
|
||||
// 標記已發送
|
||||
Dao訓練課程內容.標記已發送講師通知(課程企劃id, DAC.GetInt32(hf課程序號.Value), UserId);
|
||||
}
|
||||
}
|
||||
gv講師.DataBind();
|
||||
ClientShowMessage("講師行前通知發送完畢");
|
||||
}
|
||||
|
||||
protected void gv講師_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void Get課程資料()
|
||||
{
|
||||
int 課程企劃id = 訓練企劃搜尋.訓練企劃編號;
|
||||
訓練課程企劃List 訓練課程企劃 = Dao訓練課程企劃.SelectOne(課程企劃id);
|
||||
|
||||
if (訓練課程企劃.Count > 0)
|
||||
{
|
||||
txt聯絡人.Text = Dao員工.Get員工姓名(訓練課程企劃[0].承辦);
|
||||
txt聯絡人電話.Text = Dao員工.Get公司電話(訓練課程企劃[0].承辦);
|
||||
txt聯絡人email.Text = Dao員工.Get電子郵件(訓練課程企劃[0].承辦);
|
||||
|
||||
場地 選定場地 = GetData.取得選定場地(課程企劃id);
|
||||
txt訓練地點名稱.Text = 選定場地.場地名稱;
|
||||
txt訓練地點地址.Text = String.Format("({0}){1}{2}{3}", 選定場地.地址_郵編, 選定場地.地址_縣市, 選定場地.地址_鄉鎮市區, 選定場地.地址_街道地址);
|
||||
|
||||
Panel1.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ds已截止未上課_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao訓練課程企劃;
|
||||
}
|
||||
|
||||
protected void ds上課講師_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao訓練課程內容;
|
||||
}
|
||||
}
|
||||
}
|
||||
+377
@@ -0,0 +1,377 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自動產生>
|
||||
// 這段程式碼是由工具產生的。
|
||||
//
|
||||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
||||
// 程式碼,則會遺失變更。
|
||||
// </自動產生>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Education.Forms.辦訓前置作業
|
||||
{
|
||||
|
||||
|
||||
public partial class 講師行前通知
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// ds上課講師 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ds上課講師;
|
||||
|
||||
/// <summary>
|
||||
/// 訓練企劃搜尋 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::Education.Forms.Common.訓練企劃搜尋 訓練企劃搜尋;
|
||||
|
||||
/// <summary>
|
||||
/// lbMessage 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbMessage;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Label21 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label21;
|
||||
|
||||
/// <summary>
|
||||
/// Label25 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label25;
|
||||
|
||||
/// <summary>
|
||||
/// txt訓練地點名稱 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox 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.TextBox txt訓練地點地址;
|
||||
|
||||
/// <summary>
|
||||
/// Label27 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label27;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttach 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.FileUpload fuAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Label29 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label29;
|
||||
|
||||
/// <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>
|
||||
/// Label23 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label23;
|
||||
|
||||
/// <summary>
|
||||
/// txt聯絡人電話 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt聯絡人電話;
|
||||
|
||||
/// <summary>
|
||||
/// Label24 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label24;
|
||||
|
||||
/// <summary>
|
||||
/// txt聯絡人email 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt聯絡人email;
|
||||
|
||||
/// <summary>
|
||||
/// Label11 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label11;
|
||||
|
||||
/// <summary>
|
||||
/// cb攜帶設備_筆記型電腦 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb攜帶設備_筆記型電腦;
|
||||
|
||||
/// <summary>
|
||||
/// cb攜帶設備_課程簡報檔 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb攜帶設備_課程簡報檔;
|
||||
|
||||
/// <summary>
|
||||
/// cb攜帶設備_其他 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb攜帶設備_其他;
|
||||
|
||||
/// <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>
|
||||
/// cb場地設備_投影機 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_投影機;
|
||||
|
||||
/// <summary>
|
||||
/// cb場地設備_麥克風 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_麥克風;
|
||||
|
||||
/// <summary>
|
||||
/// cb場地設備_雷射筆 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_雷射筆;
|
||||
|
||||
/// <summary>
|
||||
/// cb場地設備_筆記型電腦 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_筆記型電腦;
|
||||
|
||||
/// <summary>
|
||||
/// cb場地設備_座位安排 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_座位安排;
|
||||
|
||||
/// <summary>
|
||||
/// cb場地設備_白紙 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_白紙;
|
||||
|
||||
/// <summary>
|
||||
/// cb場地設備_其他 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb場地設備_其他;
|
||||
|
||||
/// <summary>
|
||||
/// txt場地設備_其他 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt場地設備_其他;
|
||||
|
||||
/// <summary>
|
||||
/// Label14 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label14;
|
||||
|
||||
/// <summary>
|
||||
/// cb其他_交通安排 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb其他_交通安排;
|
||||
|
||||
/// <summary>
|
||||
/// txt交通安排 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt交通安排;
|
||||
|
||||
/// <summary>
|
||||
/// cb其他_用餐 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cb其他_用餐;
|
||||
|
||||
/// <summary>
|
||||
/// txt用餐 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txt用餐;
|
||||
|
||||
/// <summary>
|
||||
/// Label10 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label10;
|
||||
|
||||
/// <summary>
|
||||
/// gv講師 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gv講師;
|
||||
|
||||
/// <summary>
|
||||
/// btn發送 控制項。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自動產生的欄位。
|
||||
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton btn發送;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user