[WebMethod]
public bool InsertBulletin(Bullein pObj)
{
using (SqlConnection sCnn = new SqlConnection(ConnStr))
{
try
{
sCnn.Open();
SqlInsert sSqlInsert = new SqlInsert("bulletin", "bulletin_title,bulletin_class,bulletin_flag,send_flag,bulletin_content,imgUrl,update_time,bulletin_visited_times,publish_time,is_active", 1);
sSqlInsert.Add(0, "bulletin_title", DbType.String, pObj.bulletin_title);
sSqlInsert.Add(0, "bulletin_class", DbType.String, pObj.bulletin_class);
sSqlInsert.Add(0, "bulletin_flag", DbType.String, pObj.bulletin_flag);
sSqlInsert.Add(0, "send_flag", DbType.String, pObj.send_flag);
sSqlInsert.Add(0, "bulletin_content", DbType.String, pObj.bulletin_content);
sSqlInsert.Add(0, "imgUrl", DbType.String, pObj.imgUrl);
sSqlInsert.Add(0, "bulletin_visited_times", DbType.Int32, pObj.bulletin_visited_times);
sSqlInsert.Add(0, "publish_time", DbType.DateTime, pObj.publish_time);
sSqlInsert.Add(0, "is_active", DbType.String, pObj.is_active);
sSqlInsert.ExeSql(sCnn);
return true;
}
catch (Exception E)
{
LogServer.SynLog(E.ToString(), "插入公告");
return false;
}
}
}WEBSERICE中我定义了如上方法,如何调用测试窗体?
public bool InsertBulletin(Bullein pObj)
{
using (SqlConnection sCnn = new SqlConnection(ConnStr))
{
try
{
sCnn.Open();
SqlInsert sSqlInsert = new SqlInsert("bulletin", "bulletin_title,bulletin_class,bulletin_flag,send_flag,bulletin_content,imgUrl,update_time,bulletin_visited_times,publish_time,is_active", 1);
sSqlInsert.Add(0, "bulletin_title", DbType.String, pObj.bulletin_title);
sSqlInsert.Add(0, "bulletin_class", DbType.String, pObj.bulletin_class);
sSqlInsert.Add(0, "bulletin_flag", DbType.String, pObj.bulletin_flag);
sSqlInsert.Add(0, "send_flag", DbType.String, pObj.send_flag);
sSqlInsert.Add(0, "bulletin_content", DbType.String, pObj.bulletin_content);
sSqlInsert.Add(0, "imgUrl", DbType.String, pObj.imgUrl);
sSqlInsert.Add(0, "bulletin_visited_times", DbType.Int32, pObj.bulletin_visited_times);
sSqlInsert.Add(0, "publish_time", DbType.DateTime, pObj.publish_time);
sSqlInsert.Add(0, "is_active", DbType.String, pObj.is_active);
sSqlInsert.ExeSql(sCnn);
return true;
}
catch (Exception E)
{
LogServer.SynLog(E.ToString(), "插入公告");
return false;
}
}
}WEBSERICE中我定义了如上方法,如何调用测试窗体?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货