用户控件加载(VB)

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:
Imports  SmartWeb.WebBase1
Imports  System.Data.SqlClient
Public   Class ctl_pds_fcc Class ctl_pds_fcc
    
Inherits SmartWeb.ctrlBase

  Private   Sub Page_Load() Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        
'在這裡放置使用者程式碼以初始化網頁
        Try
            
If (IsPostBack = TrueThen
                
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() 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() 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() 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值