110,538
社区成员
发帖
与我相关
我的任务
分享
protected void soso_Click(object sender, EventArgs e)
{
DateTime dt1 = Convert.ToDateTime(nian.SelectedValue.ToString() + "-" + yue.SelectedValue.ToString() + "-" + ri.SelectedValue.ToString());
DateTime dt2 = Convert.ToDateTime(nian1.SelectedValue.ToString() + "-" + yue1.SelectedValue.ToString() + "-" + ri1.SelectedValue.ToString());
string son = TextBox1.Text.Trim().ToString();
string Sostr=ConfigurationManager.ConnectionStrings["WHConn"].ConnectionString;
SqlConnection Scon = new SqlConnection(Sostr);
Scon.Open();
string TSstr = "select * from gzhz where 维修时间 Between '"dt1"' and '"dt2"'";
string SSstr = "select * from gzhz where 故障地点 like '" % son % "' or 系统类别 like '" % son % "'' or 设备类型 like '" % son % "' or 故障现象 like '" % son % "' or 故障原因 like '" % son % "' or 处理办法 like '" % son % "' or 处理结果 like '" % son % "' or 参与人员 like '" % son % "'";
}
string TSstr = "select * from gzhz where 维修时间 Between '"+dt1+"' and '"+dt2+"'";