ITPub博客

首页 > IT职业 > IT生活 > 2011年11月续

2011年11月续

原创 IT生活 作者:xing2999 时间:2011-12-04 15:21:14 0 删除 编辑

2011年11月28日 星期一

①VB.NET中的函数可以返回使用表的主键值

Public Function AddNoticeAlreadyRead(ByVal ent As Entity.Entity.EntNoticeAlreadyRead) As Integer

 
 Try

  strSQL = "INSERT INTO Tbl_NoticeAlreadyRead(NoticeId,NARAlreadyReadUser,NARAlreadyReadTime) VALUES(" + ent.NoticeId.ToString() + ",'" + ent.NARAlreadyReadUser + "','" + ent.NARAlredyReadTime + "'); SELECT @@IDENTITY"

  
  If Not CargoBookingDBConnect() Then

  End If

  
  Sqlcmd = New SqlCommand(strSQL, myCargoBookingDB)

  Return Convert.ToInt32(Sqlcmd.ExecuteScalar())

 
 Catch ex As Exception

  Throw ex

 Finally

  myCargoBookingDB.Dispose()

  Sqlcmd.Dispose()

 End Try


End Function

[@more@]


②ASP.NET中调用后台函数

ForeColor='getColor(Eval("NIsUrgent"))-->'


③integer类型的用 + 连接字符串时,加tostring()转换成字符串进行连接


④、SQL Server数据库中的bit类型的数据,1为true,0为false。


⑤、释放DB_RECOVERY_FILE_DEST_SIZE所占用的磁盘空间

[....] $ rman target /

RMAN> crosscheck archivelog all;

RMAN> list expired archivelog all;

RMAN> delete noprompt expired archivelog all;


⑥、ASP.NET中的假属性


⑦、控件


2011年11月24日 星期四

①ASP.NET中调用VB.NET后台函数

函数

Public Function outURL() As String

Dim URL As String = ""

URL = URL + """ + "百度" + "

Return URL

End Function

ASP.NET中调用函数

#outURL()


②获取对应绑定字段的值

Eval("NID")或Bind("NId")

示例:

<asp:Label ID="m_id" runat="server" Text='# Bind("NId") ' Visible="False"> asp:Label>

NId为某表的字段名


2011年11月23日 星期三

①vb.net中怎么得到大于一个数的最小整数

Math.Ceiling( )


②文本框中的文本内容居中,使用样式
style= "TEXT-ALIGN:center"


2011年11月22日 星期二

①SQL Server数据库子查询做表时应加别名。


②分页查询


③附件下载


2011年11月21日 星期一

①VB.NET之附件的下载

点击某个按钮或触发某个事件下载附件


②VB.NET中获取dt(DataTable)中某行某一列的值,如获取第一行,列名为NAME的值:

Dim name As String = dt.Rows(0)("NAME")


2011年11月19日 ~ 2011年11月20日 星期五、六

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24389441/viewspace-1056679/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 查找HWM的方法
请登录后发表评论 登录
全部评论

注册时间:2010-09-29

  • 博文量
    42
  • 访问量
    148197