WIKI使用導航
站長百科導航
站長專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機
- cPanel
- 網(wǎng)址導航專題
- 云計算
- 微博營銷
- 虛擬主機管理系統(tǒng)
- 開放平臺
- WIKI程序與應用
- 美國十大主機
AspMVC控制層擴展
來自站長百科
導航: 上一頁
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