请高手 帮忙把这段vb.net 代码转换成 c# 代码
''' <summary>
''' 获取或设置所有数据权限
''' </summary>
''' <param name="cUserName">用户名</param>
''' <param name="cDataPowerType">数据权限类型</param>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property AllPower(ByVal cUserName As String, ByVal cDataPowerType As String, Optional ByVal cmd As System.Data.Common.DbCommand = Nothing) As Boolean
Get
Dim cClass As String = "数据权限"
Dim cVarName As String = cUserName & "_" & cDataPowerType
Dim Value As String = DAL.Var.Var.Create.getValue(cClass, cVarName, cmd)
If tostr(Value) = "" Or tostr(Value) = "1" Then
Return True
ElseIf tostr(Value) = "0" Then
Return False
End If
End Get
Set(ByVal value As Boolean)
Dim cClass As String = "数据权限"
Dim cVarName As String = cUserName & "_" & cDataPowerType
Dim cValue As String = IIf(value, "1", "0")
DAL.Var.Var.Create.Save(cClass, cVarName, cValue, cmd)
End Set
End Property
End Class
''' 获取或设置所有数据权限
''' </summary>
''' <param name="cUserName">用户名</param>
''' <param name="cDataPowerType">数据权限类型</param>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property AllPower(ByVal cUserName As String, ByVal cDataPowerType As String, Optional ByVal cmd As System.Data.Common.DbCommand = Nothing) As Boolean
Get
Dim cClass As String = "数据权限"
Dim cVarName As String = cUserName & "_" & cDataPowerType
Dim Value As String = DAL.Var.Var.Create.getValue(cClass, cVarName, cmd)
If tostr(Value) = "" Or tostr(Value) = "1" Then
Return True
ElseIf tostr(Value) = "0" Then
Return False
End If
End Get
Set(ByVal value As Boolean)
Dim cClass As String = "数据权限"
Dim cVarName As String = cUserName & "_" & cDataPowerType
Dim cValue As String = IIf(value, "1", "0")
DAL.Var.Var.Create.Save(cClass, cVarName, cValue, cmd)
End Set
End Property
End Class
...全文
相关推荐
C#代码项目转换VB.NET项目代码(可整个项目转换)
C#代码项目转换VB.NET项目代码(可整个项目转换)C#代码项目转换VB.NET项目代码(可整个项目转换)
VB.NET转C#代码转换工具实操指南
本文还有配套的精品资源,点击获取 简介:本文介绍了"VB.NET to C# Converter"工具的重要性和应用,该工具能够高效地将VB.NET代码自动转换为C#代码,保留变量名和注释,减少开发者的转换工作量。VB.NET和C#作为.NET平台上的两种语言,各有特点,其中C#在现代编程领域具有广泛应用。工具支持试用版和完整版,试用版可永久使用但处理代码行数有限。详细操作...
VB.Net to C# Converter将VB代码转换成C#代码
本资源为【VB.Net to C# Converter】软件,它可以将VB代码转换成C#代码,效果很好
C#代码转换为VB.NET代码的工具
C#代码转换为VB.NET代码的工具,直接运行即可转换
C#与Vb.net代码互转工具
在离线状态下,可将C#转为Vb.net代码,或将Vb.net转为c#代码,非常简单方便。


