Commit 95806702 authored by solho's avatar solho

取得關帳日期所部別邏輯修正

parent 902e8db8
......@@ -134,18 +134,18 @@ namespace WebAPI.Controllers
strsql += " and isClosed=@isClosed ";
cmd.Parameters.Add("@isClosed", (obj_input["isClosed"].ToString()=="1"?true:false));
}
if (objPermission_furtherSql["firmID"] != null )
if (objPermission_furtherSql["firmID"] != null && !String.IsNullOrEmpty(objPermission_furtherSql["firmID"].ToString()))
{
strsql += " and b.ID in(@DSid)";
strsql= strsql.Replace("@DSid", objPermission_furtherSql["firmID"].ToString());
//cmd.Parameters.Add("@DSid", objPermission_furtherSql["firmID"].ToString());
}
if (objPermission_furtherSql["deptID"] != null )
if (objPermission_furtherSql["deptID"] != null && !String.IsNullOrEmpty(objPermission_furtherSql["deptID"].ToString()))
{
//strsql += " and DeptNum in(@DeptNum)";
//cmd.Parameters.Add("@DeptNum", objPermission_furtherSql["deptID"].ToString());
}
if (objPermission_furtherSql["workGroupID"] != null )
if (objPermission_furtherSql["workGroupID"] != null && !String.IsNullOrEmpty(objPermission_furtherSql["workGroupID"].ToString()))
{
//strsql += " and ItemNum in(@ItemNum)";
//cmd.Parameters.Add("@ItemNum", objPermission_furtherSql["workGroupID"].ToString());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment