解决方案 »
- 先检测供应商名是否存在,不存在就退出,不要执行ImportData()导入操作 要怎么写呀?
- 关于textarea控件。
- C# 动态加载水晶报表,那位高手做过啊,就是水晶报表要加载的数据源行和列都不确定。
- 请问在WINFORM里有没有像WEB空间DataList那样的有RepeatColumns的控件啊!!
- C和C#的接口探究问题
- 求地球上点度分秒格式与弧度格式经纬度转换算法
- 急!关于数据库SQL语句的问题,在线等
- 关于C#强制转换的问题
- 用htmlagilitypack解析的是不是只是源代码中的内容
- cs模式下如何读取Cookie
- C# qq空间登录用的webbrowser 报错
- 关于google地图的api问题。有点急。
@Html.TextBoxFor(m >= m.qyName, New {@onfocus="alert(123);"}) 我这样写提示 我m 是保护级别,New 的东西也无效.........
alert( "Handler for .focus() called." );
});
楼主你又救我一命,我之前写成了 @Html.TextBoxFor(m => m.qyName, New With {.onfocus="alert(123);"})
现在是
@Html.TextBoxFor(Function(model) model.qyDate, New With {.onfocus = "WdatePicker();"})对这个HtmlHelper好不熟悉,才刚学几天,昨天在MVC中把增删改用弹出层实现了,然后就在纠结日期控件,后续把分页写好就基本完成任务了。谢谢版主~
企业名称: @Html.TextBox("qyname", "", New With {.style = " width:120px;"})
合同号: @Html.TextBox("ContractNo", "", New With {.style = " width:80px;"})
签约日期: @Html.TextBox("qydate", "", New With {.style = " width:80px;", .onfocus = "WdatePicker();"})
到账日期: @Html.TextBox("todate", "", New With {.style = " width:80px;", .onfocus = "WdatePicker();"})
截止日期: @Html.TextBox("enddate", "", New With {.style = " width:80px;", .onfocus = "WdatePicker();"})
顾问: @Html.TextBox("counselor", "", New With {.style = " width:80px;"})
版主 我要做查询,控制器如何能获取到这些值并查询了?
Function Index() As ActionResult
Dim dal As New HRContractDAL
Dim dt As New DataTable
Dim strWhere As String = " 1=1 "
If Request.Form("qyname") <> "" Then
strWhere = strWhere + " and qyname like '" + Request.Form("qyname") + "%'"
End If
If Request.Form("ContractNo") <> "" Then
strWhere = strWhere + " and ContractNo like '" + Request.Form("ContractNo") + "%'"
End If
If Request.Form("qydate") <> "" Then
strWhere = strWhere + " and qydate >= '" + Request.Form("ContractNo") + "%'"
End If
If Request.Form("todate") <> "" Then
strWhere = strWhere + " and todate >= '" + Request.Form("ContractNo") + "%'"
End If
If Request.Form("enddate") <> "" Then
strWhere = strWhere + " and enddate <= '" + Request.Form("ContractNo") + "%'"
End If
If Request.Form("counselor") <> "" Then
strWhere = strWhere + " and ContractNo like '" + Request.Form("ContractNo") + "%'"
End If
dt = dal.GetList(strWhere, "")
Dim list As New List(Of HRContractEntity)
For Each row As DataRow In dt.Rows
list.Add(New HRContractEntity With {.ID = row("ID").ToString(), .qyName = row("qyName").ToString(), .ContractNO = row("ContractNO").ToString(), .counselor = row("counselor").ToString(), .endDate = row("endDate").ToString(), .logoMoney = row("logoMoney").ToString(), .phone = row("phone").ToString(), .qyDate = row("qyDate").ToString(), .qyMoney = row("qyMoney").ToString(), .toDate = row("toDate").ToString()})
Next
Return View(list)
End Function
查询我是这样写的, 断点调试发现获取不到值