CeramicProject/newyt/Common/cgfk_dy.aspx.cs

66 lines
2.4 KiB
C#
Raw Normal View History

2024-05-18 15:28:29 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Ajax;
public partial class Common_cgfk_dy : System.Web.UI.Page
{
public string userinfo = "";
protected void Page_Load(object sender, EventArgs e)
{
DataTable dtuserinfo = DBHlper.Execute("select mingcheng,logourl from nr_sysuserinfo").Tables[0];
if (dtuserinfo.Rows.Count > 0)
{
userinfo = dtuserinfo.Rows[0]["mingcheng"].ToString();
img_logo.Src = "../UseFile/" + dtuserinfo.Rows[0]["logourl"].ToString();
}
else
{
img_logo.Visible = false;
}
Utility.RegisterTypeForAjax(typeof(Common_cgfk_dy));
dyrq.Text = DateTime.Now.ToString("yyyy-MM-dd");
}
[Ajax.AjaxMethod]
public string[] getxinxi(int[] zu)
{
string[]code =new string[2];
string code1 = "";
string khname = "";
foreach (int i in zu)
{
DataSet ds = DBHlper.Execute("select *,(SELECT ISNULL(SUM(je), 0) FROM dbo.nr_z_cgrk WHERE (id=view_n_z_cgfk.mxid)) as zje from view_n_z_cgfk where id='" + i + "' order by id ");
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
//如果当前订单下存在明细就加载成tr行
foreach (DataRow r in ds.Tables[0].Rows)
{
khname = r["mingcheng"].ToString();
code1 += "<tr>"
+ " <td class='head4'>" + r["cgdbianhao"].ToString() + "</td>"
+ "<td class='head4'>" + r["wlmc"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["zje"].ToString() + "</td>"
+ "</td><td class='head4 je'>" + r["fkje"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["fkfs"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["fpje"].ToString() + "</td>"
+ "</td><td class='head4'>" + Convert.ToDateTime(r["fkrq"]).ToString("yyyy-MM-dd") + "</td>"
+ "</td><td class='head4'>" + r["bz"].ToString() + "</td></tr>";
}
}
}
code[0] = code1;
code[1] = khname;
return code;
}
[Ajax.AjaxMethod]
public string hsdx(string zje)
{
return DBHlper.ConvertToChineseNum(zje);
}
}