12,162
社区成员
发帖
与我相关
我的任务
分享
[WebMethod]
public string Dorm_CheckOut(string[] emplidArr)
{
................
}
static void Main(string[] args)
{
string[] emplidArr = { "","",""};
WebReference.DormWebService dormService = new WebReference.DormWebService();
Console.WriteLine(dormService.Dorm_CheckOut(emplidArr));
Console.ReadKey();
}
try
{
string strSql1 = "UPDATE person p SET p.building_code = '', p.room_id = '', p.active = 'O' WHERE p.emplid in (" + emplid + ") and p.active='Y'";
string strSql2 = @"UPDATE accomm a SET a.odate = trunc(sysdate), a.outdormadm = 'system', a.action_type = 'O', a.out_reason = '離職退宿'
WHERE a.accomm_id in (select p.accomm_id from person p where p.emplid in (" + emplid + ") and p.active = 'Y') and a.action_type = 'I'";
BLLDAL myInsert = new BLLDAL(this.sconn);
myInsert.ExecuteSQL(strSql1);
myInsert.ExecuteSQL(strSql2);
}
catch (Exception ex)
{
return "NO";
}
return "OK";
我这段代码在原来系统里执行没报错,用窗口程序调用service接收的结果是NO