久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔

AspMVC控制層擴展

來自站長百科
跳轉(zhuǎn)至: 導航、? 搜索

導航: 上一頁

AspMVC控制層擴展會話

Class ComControl

Private Contorl,Page 

'初始化
Private Sub Class_Initialize

If Session("UserName") = "" Then 
Response.Write("<script>alert(""" & application("Project") & "提示:請您先登錄."");location=""Comlogin.asp""</script>")
Response.End()
Else
If Session("GroupId") <>2 Then
Response.Write("<script>alert(""" & application("Project") & "提示:對不起,您不是企業(yè)用戶."");location=""Comlogin.asp""</script>")
Response.End()
End If
End If


Set Contorl = new ContorlHelp
Set Page = Contorl.GetPage
End Sub

'銷毀
Private Sub Class_Terminate
Set Contorl = Nothing
End sub

Public Property Let SetPageSizes(Pages)
Contorl.SetPageSizes = Pages
End Property

'取得分頁對像
Public Property Get PageUrl
PageUrl = Page.PageUrl()
End Property

'取得分頁對像
Public Property Get PageUrlnl
PageUrlnl = Page.PageUrlnl()
End Property

'設置是否獲PK值
Public Property Let SetPk(PkValue)
Contorl.SetPk = PkValue
End Property

'設置是否獲FK值
Public Property Let SetFk(FkValue)
Contorl.SetFk = FkValue
End Property

Public Property Let SetUploadPath(Path)
Contorl.SetUploadPath =Path
End Property


'取得[[分頁]]對像
Public Property Get GetConn
Set GetConn =Contorl.GetConn
End Property

'***************************************************
' 用戶操作 表:users 操作:Save,Del,List,Model
'***************************************************

'保存及修改/返回Bool
Public Function Saveusers(Req)
Saveusers = Contorl.SaveModel(Req,"users") 
End Function

'刪除
Public Function Delusers(ID)
Delusers = Contorl.DelModel(ID,"users")
End Function


'[[列表]]/[[數(shù)組]]中
Public Function Listusers()
Listusers = Contorl.ListModel("users","[[id]] = " & Session("UserId"))
End Function


'實體/Key
Public Function Modelusers()
Set Modelusers = Contorl.GetModel(Session("UserId"),"users")
End Function


[['實體/Key]]
Public Function Getusers(Id)
Set Getusers = Contorl.GetModel(Id,"users")
End Function


'創(chuàng)建Model
public Function CreateModel(Table)
Set CreateModel = Contorl.CreateModel(Table)
End Function

'SavelModel,保存與修改
public Function ModelSave(Object,Table)
ModelSave = Contorl.ModelSave(Object,Table)
End Function


'TempObjectArr
Public Function CreateTempArr(Sql,ObjectName)
CreateTempArr = Contorl.CreateTempArr(Sql,ObjectName)
End Function


Public Sub Exec(Sql)
Contorl.Exec(Sql)
End Sub