相思资源网 Design By www.200059.com
前台:
复制代码 代码如下:
function SelectProject() {
var a = new Array;
var r = window.showModalDialog('SelProject.aspx', a, "dialogWidth=1000px; dialogHeight=600px; resizable: yes");
if (typeof (r) != 'undefined') {
var arr = r.split(";");
$("#hidProjectInnerID").val(arr[0]);
$("#txtProjectNo").val(arr[1]);
$.getJSON("../Handler/GetProjectInfor.ashx", { key: "PaymentStatement", InnerID: $("#hidProjectInnerID").val() },
function (json) {
$("#labFinalCustomer").text(json.finalclient);
$("#labOrderNo").text(json.orderno);
var strDeviceTr = "";
$.each(json.workinghours, function (i, item) {
strDeviceTr += "<tr><td><lable name="infor"> " + item.description + "</lable> </td>";
strDeviceTr += "<td> </td>";
strDeviceTr += " <td><lable name="infor"> " + item.hoursdays + "</lable></td>";
strDeviceTr += "<td> 0.8</td>";
strDeviceTr += "<td><lable name="infor"> " + item.workinghour + " </lable></td>";
strDeviceTr += "<td> 0.8</td>";
strDeviceTr += "<td><lable name="infor"> " + item.workinghour + "</lable></td>";
strDeviceTr += "<td> </td>";
strDeviceTr += "</tr>";
});
$("#infor").append(strDeviceTr);
});
}
}
ashx
复制代码 代码如下:
string innerid = CommonClass.Request.GetRequest<string>("InnerID", "");
string key = CommonClass.Request.GetRequest<string>("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(result);
}
#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
{
return string.Empty;
}
}
catch (Exception ex)
{
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 < dt.Rows.Count; i++)
{
json.Append("{");
json.Append(""innerid":"" + dt.Rows[0]["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
复制代码 代码如下:
function SelectProject() {
var a = new Array;
var r = window.showModalDialog('SelProject.aspx', a, "dialogWidth=1000px; dialogHeight=600px; resizable: yes");
if (typeof (r) != 'undefined') {
var arr = r.split(";");
$("#hidProjectInnerID").val(arr[0]);
$("#txtProjectNo").val(arr[1]);
$.getJSON("../Handler/GetProjectInfor.ashx", { key: "PaymentStatement", InnerID: $("#hidProjectInnerID").val() },
function (json) {
$("#labFinalCustomer").text(json.finalclient);
$("#labOrderNo").text(json.orderno);
var strDeviceTr = "";
$.each(json.workinghours, function (i, item) {
strDeviceTr += "<tr><td><lable name="infor"> " + item.description + "</lable> </td>";
strDeviceTr += "<td> </td>";
strDeviceTr += " <td><lable name="infor"> " + item.hoursdays + "</lable></td>";
strDeviceTr += "<td> 0.8</td>";
strDeviceTr += "<td><lable name="infor"> " + item.workinghour + " </lable></td>";
strDeviceTr += "<td> 0.8</td>";
strDeviceTr += "<td><lable name="infor"> " + item.workinghour + "</lable></td>";
strDeviceTr += "<td> </td>";
strDeviceTr += "</tr>";
});
$("#infor").append(strDeviceTr);
});
}
}
ashx
复制代码 代码如下:
string innerid = CommonClass.Request.GetRequest<string>("InnerID", "");
string key = CommonClass.Request.GetRequest<string>("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(result);
}
#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
{
return string.Empty;
}
}
catch (Exception ex)
{
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 < dt.Rows.Count; i++)
{
json.Append("{");
json.Append(""innerid":"" + dt.Rows[0]["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
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无JQuery 获取json数据$.getJSON方法的实例代码的评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?