OrderList.aspx.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. using SiteCore;
  2. using System;
  3. public partial class EOrder_OrderList : BasePage
  4. {
  5. protected override void OnPreInit(EventArgs e)
  6. {
  7. _repTitle = "订单列表";
  8. PmTag = "orderlist";
  9. //_selfCheckPermission = true;
  10. _filterItem = "order,shop,wang,fukuan,moeny,memo,cus,des,state,oldcus,assign_time,addwechat,upload_time,finish_time,backreason,isNewSearch,overtime";
  11. _keyFilterVisible = false;
  12. _addVisible = false;
  13. }
  14. protected void Page_Load(object sender, EventArgs e)
  15. {
  16. if (_permissions.Contains("downfile"))
  17. {
  18. btnDownloadFile.Visible = true;
  19. }
  20. else
  21. {
  22. btnDownloadFile.Visible = false;
  23. }
  24. if (_permissions.Contains("distribute"))
  25. {
  26. btnDistribute.Visible = true;
  27. }
  28. else
  29. {
  30. btnDistribute.Visible = false;
  31. }
  32. if (_permissions.Contains("export"))
  33. {
  34. btnExport.Visible = true;
  35. }
  36. else
  37. {
  38. btnExport.Visible = false;
  39. }
  40. if (_permissions.Contains("orderreset"))
  41. {
  42. btnOrderReset.Visible = true;
  43. }
  44. else
  45. {
  46. btnOrderReset.Visible = false;
  47. }
  48. if (_permissions.Contains("orderdelete"))
  49. {
  50. btnOrderDelete.Visible = true;
  51. }
  52. else
  53. {
  54. btnOrderDelete.Visible = false;
  55. }
  56. if (_permissions.Contains("returncash"))
  57. {
  58. btnReturnCash.Visible = true;
  59. }
  60. else
  61. {
  62. btnReturnCash.Visible = false;
  63. }
  64. if (_permissions.Contains("addneworder"))
  65. {
  66. btnaddNewOrder.Visible = true;
  67. }
  68. else
  69. {
  70. btnaddNewOrder.Visible = false;
  71. }
  72. if (_permissions.Contains("clearrefund"))
  73. {
  74. btnClearRefund.Visible = true;
  75. }
  76. else
  77. {
  78. btnClearRefund.Visible = false;
  79. }
  80. if (_permissions.Contains("aftersale"))
  81. {
  82. btnAfterSale.Visible = true;
  83. }
  84. else
  85. {
  86. btnAfterSale.Visible = false;
  87. }
  88. if (_permissions.Contains("checked"))
  89. {
  90. btnChecked.Visible = true;
  91. }
  92. else
  93. {
  94. btnChecked.Visible = false;
  95. }
  96. if (!IsPostBack)
  97. {
  98. //downFrame.Text = "<iframe src=\"" + webConfig.ltDownLoadUrl + "\" style=\"width:0px;height:0px;display:none\" ></iframe>";
  99. string sData = GetString("sData");
  100. if (sData != "") AppendScript("openPageData=" + sData + ";");
  101. AppendScript("viewUrl='" + webConfig.ltFileSiteUrl + "/d/fx';uploadUrl ='" + webConfig.ltSimUploadUrl + "?ut=fx';");
  102. AppendScript("cdrImgUrl='" + webConfig.ltFileSiteUrl + "/d/ws';");
  103. AppendScript("downUrl='" + webConfig.ltDownLoadUrl + "';");
  104. AppendScript("userId='" + CurrentUser.UserID + "';");
  105. AppendScript("userPostCode='" + CurrentUser.UserPost.Post.Code + "';");
  106. //string ctid = GetString("ctid");
  107. //string tid = GetString("tid");
  108. //StringBuilder sql = new StringBuilder();
  109. //sql.AppendFormat("select * from view_erptradecell where ctid={0};",ctid);
  110. //sql.AppendFormat("select * from ce_erpBill where tid={0};",0);
  111. //sql.AppendFormat("select * from ce_ErpReturnCash where tid={0};",0);
  112. //sql.AppendFormat("select * from ce_erptradorder where tid={0};",0);
  113. //sql.AppendFormat("select * from ce_erptradeLog where AfterSaleState>=0 and ctid={0};",0);
  114. //DataSet ds = DbHelper.DbConn.ExecuteDataset(sql.ToString());
  115. //AppendScript("tradeData=" + JsonString.DataTable2AjaxJson(ds.Tables[0]) + ";");
  116. //AppendScript("billData=" + JsonString.DataTable2AjaxJson(ds.Tables[1]) + ";");
  117. //AppendScript("cashData=" + JsonString.DataTable2AjaxJson(ds.Tables[2]) + ";");
  118. //AppendScript("orderData=" + JsonString.DataTable2AjaxJson(ds.Tables[3]) + ";");
  119. //selType.DataSource = dt;
  120. //selType.DataValueField = "ID";
  121. //selType.DataTextField = "Name";
  122. //selType.DataBind();
  123. }
  124. //foreach (DataRow dr in dt.Rows)
  125. //{
  126. //}
  127. }
  128. }