Order_Detail.aspx.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using BizCom;
  2. using Castle.ActiveRecord;
  3. using SQLData;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Data;
  7. using System.Text;
  8. using System.Web;
  9. using System.Web.UI;
  10. using System.Web.UI.WebControls;
  11. using Utils;
  12. using SiteCore;
  13. using Utils.Serialization;
  14. public partial class EOrder_Order_Detail: BasePage
  15. {
  16. protected override void OnPreInit(EventArgs e)
  17. {
  18. _selfCheckPermission = true;
  19. }
  20. protected void Page_Load(object sender, EventArgs e)
  21. {
  22. if (!IsPostBack)
  23. {
  24. string ctid = GetString("ctid");
  25. string tid = GetString("tid");
  26. StringBuilder sql = new StringBuilder();
  27. sql.AppendFormat("select * from view_erptradecell where ctid='{0}';",ctid);
  28. sql.AppendFormat("select * from view_erpBill where tid='{0}';", tid);
  29. sql.AppendFormat("select * from view_ErpReturnCash where tid='{0}';", tid);
  30. sql.AppendFormat("select * from ce_erptradeorder where tid='{0}';", tid);
  31. sql.AppendFormat("select * from view_erptradeLog where AfterSaleState>0 and tid='{0}';", ctid);
  32. if (ctid.IndexOf("S") != -1)
  33. {
  34. string backmainctid = ctid.Replace("S_", "");
  35. sql.AppendFormat("select * from view_erptradecell where ctid='{0}';", backmainctid);
  36. }
  37. DataSet ds = DbHelper.DbConn.ExecuteDataset(sql.ToString());
  38. AppendScript("tradeData=" + JsonString.DataTable2AjaxJson(ds.Tables[0]) + ";");
  39. AppendScript("billData=" + JsonString.DataTable2AjaxJson(ds.Tables[1]) + ";");
  40. AppendScript("cashData=" + JsonString.DataTable2AjaxJson(ds.Tables[2]) + ";");
  41. AppendScript("orderData=" + JsonString.DataTable2AjaxJson(ds.Tables[3]) + ";");
  42. AppendScript("logData=" + JsonString.DataTable2AjaxJson(ds.Tables[4]) + ";");
  43. if (ctid.IndexOf("S") != -1)
  44. {
  45. AppendScript("afterMainData=" + JsonString.DataTable2AjaxJson(ds.Tables[5]) + ";");
  46. }
  47. //selType.DataSource = dt;
  48. //selType.DataValueField = "ID";
  49. //selType.DataTextField = "Name";
  50. //selType.DataBind();
  51. AppendScript("downUrl='" + webConfig.ltSimDownLoadUrl + "';");
  52. AppendScript("userPostCode='" + CurrentUser.UserPost.Post.Code + "';");
  53. }
  54. //foreach (DataRow dr in dt.Rows)
  55. //{
  56. //}
  57. }
  58. }