50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
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 int 心得報告ID;
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
FunctionName = "心得報告討論管理";
|
|
|
|
心得報告ID = DAC.GetInt32(Request["id"]);
|
|
Dao心得報告討論 = new DAC_心得報告討論(conn);
|
|
|
|
Grid_View = gv心得報告討論;
|
|
GridView_DataSource = ds心得報告討論;
|
|
|
|
|
|
if (IsPostBack)
|
|
Grid_View.DataBind();
|
|
}
|
|
|
|
protected void gv心得報告討論_RowCommand(object sender, GridViewCommandEventArgs e)
|
|
{
|
|
if (e.CommandName == "上架")
|
|
{
|
|
Dao心得報告討論.上架(心得報告ID, DAC.GetInt32(e.CommandArgument));
|
|
Grid_View.DataBind();
|
|
}
|
|
else if (e.CommandName == "下架")
|
|
{
|
|
Dao心得報告討論.下架(心得報告ID, DAC.GetInt32(e.CommandArgument));
|
|
Grid_View.DataBind();
|
|
}
|
|
}
|
|
|
|
protected void ds心得報告討論_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
|
{
|
|
e.ObjectInstance = Dao心得報告討論;
|
|
}
|
|
}
|
|
} |