string innerid = CommonClass.Request.GetRequest("InnerID", "");
string key = CommonClass.Request.GetRequest("key", "");
string result = "";
if (key == "StockOutApp" && innerid != "")
{
result = StockOutApp(innerid);
context.Response.Write(result );
}
else if (key == "PaymentStatement" && innerid != "")
{
result = PaymentStatement(innerid);
context.Response.Write(結果) ;
}
#region 结算单情報
public string PaymentStatement(string _innerid)
{
try
{
string sql = @"select InnerID,pFinalClient,pOrderNo from se_ProjectMain where InnerID='" _innerid "'";
DataTable dt = SqlShift.GetDataTable(sql);
if (!CommonClass.DTRow.CheckDtIsEmpty(dt))
{
StringBuilder json = new StringBuilder();
json.Append(""innerid":"" dt.Rows[0]["InnerID"].ToString() """);
json.Append(","finalclient" :"" dt.Rows[0]["pFinalClient"].ToString() """);
json.Append(","orderno":"" dt.Rows[0]["pOrderNo"]。 ToString() """);
json.Append(","workinghours":" GetWorkingHours(_innerid));
return "{" json.ToString().Trim(',') "}" ;
}
else
{
戻り文字列.Empty;
}
}
catch (例外例)
{
AppLog.Write("项目获取异常![异常情報:" ex.Message "]", AppLog.LogMessageType.Info);
return string.Empty;
}
}
public string GetWorkingHours(string _innerid)
{
try
{
string sql = @"select InnerID, wDescription,wWorkingHour,wHours_Days from se_ProjectWorkingHour where wProjectID='" _innerid "'";
DataTable dt = SqlShift.GetDataTable(sql);
if (!CommonClass.DTRow.CheckDtIsEmpty(dt))
{
StringBuilder json = new StringBuilder();
for (int i = 0; i {
json.Append("{");
json.Append(""innerid":"" "].ToString() """);
json.Append(","description":"" dt.Rows[0]["wDescription"].ToString() """);
json.Append(","workinghour":"" dt .Rows[0]["wWorkingHour"].ToString() """);
json.Append(","hoursdays":"" dt.Rows[0]["wHours_Days"].ToString() " "");
json.Append("},");
}
return "[" json.ToString().Trim(',') "]";
}
else
{
return string.Empty;
}
}
catch (Exception ex)
{
AppLog.Write("项目获取异常![异常情報: " ex.Message "]", AppLog.LogMessageType.Info);
return string.Empty;
}
}
#endregion