cs:
Dim Control As Object
////////////////////////////////
If (Request.Cookies("UserInfo")("e_id") <> "") Then
Control = New ctl_pds_fcc
Control = CType(Me.Page.LoadControl("control/ctl_pds_fcc.ascx"), ctl_pds_fcc)
'CType(Control, ctl_pds_fcc).ID = i
CType(Control, ctl_pds_fcc).e_id = Request.Cookies("UserInfo")("e_id") '員工代碼
CType(Control, ctl_pds_fcc).from_id = Request.QueryString("from_pub_id")
PlaceHolder1.Controls.Add(Control)
End If
ascx: ////////////////////////////////
If (Request.Cookies("UserInfo")("e_id") <> "") Then
Control = New ctl_pds_fcc
Control = CType(Me.Page.LoadControl("control/ctl_pds_fcc.ascx"), ctl_pds_fcc)
'CType(Control, ctl_pds_fcc).ID = i
CType(Control, ctl_pds_fcc).e_id = Request.Cookies("UserInfo")("e_id") '員工代碼
CType(Control, ctl_pds_fcc).from_id = Request.QueryString("from_pub_id")
PlaceHolder1.Controls.Add(Control)
End If
Imports SmartWeb.WebBase1
Imports System.Data.SqlClient
Public Class ctl_pds_fcc
Inherits SmartWeb.ctrlBase
Imports System.Data.SqlClient
Public Class ctl_pds_fcc
Inherits SmartWeb.ctrlBase
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在這裡放置使用者程式碼以初始化網頁
Try
If (IsPostBack = True) Then
Return
End If
If po_id = "" Or e_id = "" Or from_id = "" Then
Return
End If
GetUserInfo(e_id)
BindGrid(po_id, e_id, from_id)
BindGridZL(from_id, e_id) ' 職能評估紀錄
BindGridLD(from_id, e_id) ' 建議輪調與晉升紀錄
Catch Ex As System.Exception
ErrorHandler(Ex.ToString(), Message)
End Try
End Sub
' 定义一些方法(外部d)
Public str_e_id As String
Public Property e_id() As String
Get
Return str_e_id
End Get
Set(ByVal Value As String)
str_e_id = Value
End Set
End Property
Public str_po_id As String
Public Property po_id() As String
Get
Return str_po_id
End Get
Set(ByVal Value As String)
str_po_id = Value
End Set
End Property
Public str_from_id As String
Public Property from_id() As String
Get
Return str_from_id
End Get
Set(ByVal Value As String)
str_from_id = Value
End Set
End Property
End Class
'在這裡放置使用者程式碼以初始化網頁
Try
If (IsPostBack = True) Then
Return
End If
If po_id = "" Or e_id = "" Or from_id = "" Then
Return
End If
GetUserInfo(e_id)
BindGrid(po_id, e_id, from_id)
BindGridZL(from_id, e_id) ' 職能評估紀錄
BindGridLD(from_id, e_id) ' 建議輪調與晉升紀錄
Catch Ex As System.Exception
ErrorHandler(Ex.ToString(), Message)
End Try
End Sub
' 定义一些方法(外部d)
Public str_e_id As String
Public Property e_id() As String
Get
Return str_e_id
End Get
Set(ByVal Value As String)
str_e_id = Value
End Set
End Property
Public str_po_id As String
Public Property po_id() As String
Get
Return str_po_id
End Get
Set(ByVal Value As String)
str_po_id = Value
End Set
End Property
Public str_from_id As String
Public Property from_id() As String
Get
Return str_from_id
End Get
Set(ByVal Value As String)
str_from_id = Value
End Set
End Property
End Class