<%@ Control Language="C#" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Config" %>
<%@ Import Namespace="Kesion.Components" %>
<%@ Import Namespace="Kesion.HtmlTags" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.Course" %>
<%@ Import Namespace="Kesion.XML" %>
<script runat="server" type="text/C#">

    string sqlParam = "  Where a.OrderFlag!=1";
    int DuanXinTiaoshu = 0;
    EpConfig ep = null;
    int IsCuiDan = 0;
    float sum = 0;
    int ID;
    int CourseId;
    int classId;
    float point = 0;


    int recordcount, pagecount;
    int PageIndex = new BasicField().GetCurrPage;
    int pagesize = 10;
    DataRow drr = null;//修改初始化使用

    private string GetVal(string fieldName)
    {
        if (drr != null)
        {
            return drr[fieldName].ToString();
        }
        else
        {
            return string.Empty;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ep = new EpConfig();
        if (point == 0)
        {
            string setting = XmlObject.ReadXmlReturnNode(Utils.GetMapPath("/config/course/EpSpace.config"), "//EpConfigInfo/Setting");
            string[] tpArr = string.Concat(setting, "#################").Split('#');
            point = Utils.StrToFloat(Utils.StrToInt(tpArr[27]) / 100);
        }
        using (DataTable dt = DataFactory.GetDataTable("select top 1 DuanXinTiaoshu,IsCuiDan from KS_EnterPrise where userid=" + UserManage.GetUserInfo().UserID))
        {
            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                IsCuiDan = Utils.StrToInt(dr["IsCuiDan"].ToString());
                DuanXinTiaoshu = Utils.StrToInt(dr["DuanXinTiaoshu"].ToString());
            }
        }
        if (KSCMS.S("action") == "modify")
        {
            initialEdit(Utils.StrToInt(KSCMS.S("orderid")));//编辑初始化
            if (KSCMS.S("update") == "update")
            {
                updateinfo();//修改操作
            }
        }
        if(KSCMS.S("export")=="export")
        {


            Export(0);//导出
        }
        if(KSCMS.S("action")=="delete"){
            deleteSj(KSCMS.S("ids"));//删除
        }
    }
    //修该信息
    private void updateinfo()
    {
        if (string.IsNullOrEmpty(KSCMS.S("GoodsMoney").Trim()))
        {
            Msg.Alert("请输入最终价格！");
            return;
        }
        Hashtable ht = new Hashtable();
        ht.Add("GoodsMoney", Utils.StrToFloat(KSCMS.S("GoodsMoney"))); //课程价    
        ht.Add("OrderTotalPrice", Utils.StrToFloat(KSCMS.S("GoodsMoney"))); //课程价    
        CommonData.Update("KS_CosOrder", ht, "where status=0 and  id=" + Utils.StrToInt(KSCMS.S("orderid")) + "");
        Msg.Alert("恭喜,订单修改成功!", BasicField.GetUserUrl("order/User_CsOrderList"));
    }
    //删除
    private void deleteSj(string ID)
    {
        if (ID == null || ID == "0") return;
        ID = Utils.FilterIDs(ID);
        using (DataTable dt = DataFactory.GetDataTable("select top 20 id,orderid from KS_CosOrder Where id in( " + ID + ") and status=0 "))
        {
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    Hashtable ht1 = new Hashtable();
                    //	int id = Utils.StrToInt(dr["id"].ToString());
                    string orderid = dr["orderid"].ToString();
                    ht1.Add("orderid", orderid);
                    CommonData.Delete("KS_CosOrder", ht1);
                    CommonData.Delete("KS_CosOrderItem", ht1);
                    DataFactory.ExecuteNonQuery("UPDATE  KS_ProCouponUser SET Courseorder='',UseFlag=0 where  courseorder='" + dr["orderid"].ToString() + "'");
                }
            }
        }
        Msg.Alert("恭喜,订单删除成功!", KSCMS.GetComeUrl());
    }
    //导出
    private void Export(int flag = 0)
    {
        #region 导出
        getParam();

        StringBuilder sb = new StringBuilder();
        if (flag == 1)
        {
            Response.BufferOutput = true;
            //设定输出的字符集
            Response.Charset = "GB2312";
            //假定导出的文件名为FileName.doc

            Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
            ////设置导出文件的格式
            Response.ContentType = "application/ms-word";
            sb.AppendLine(@"   <style>
	                        .table-c{ background:#888}
	                        .table-c th{ font-family:微软雅黑;font-size:17px;color:#FFF;height:30px;padding:5px; padding-left:0px;}
	                        .table-c td{ font-family:微软雅黑;font-size:17px;background:#FFF;height:30px;padding:5px; padding-left:0px;}
                        </style>");

            sb.Append(@"<table border=""1"" width=""100%"" align=""center"" cellpadding=""0"" bordercolor=""#000000""  cellspacing=""0"" class=""table-c"" >");
        }
        else
        {
            sb.Append(@"<table border=""1"" width=""100%"">");
        }

        using (DataTable dt = DataFactory.GetDataTable("select a.status,a.paytime,a.realname,a.mobile,a.UserName,b.*  From KS_CosOrder a inner join KS_CosOrderItem b on a.orderid=b.orderid " + sqlParam + " order by a.id desc"))
        {
            if (dt.Rows.Count > 0)
            {
                sb.Append("<thead><tr>");
                sb.Append(@"<td style=""height:36px;text-align:center;font-weight:bold"">订单编号</td><td style=""height:36px;text-align:center;font-weight:bold"">订单状态</td><td style=""height:36px;text-align:center;font-weight:bold"">课程名称</td><td style=""height:36px;text-align:center;font-weight:bold"">成交单价(元）</td><td style=""height:36px;text-align:center;font-weight:bold"">购买学员</td><td style=""height:36px;text-align:center;font-weight:bold"">联系人</td>");
                sb.Append(@"<td style=""height:36px;text-align:center;font-weight:bold"">联系电话</td>");
                sb.Append(@"<td style=""height:36px;text-align:center;font-weight:bold"">下单时间</td>");
                sb.Append("</tr></thead>");
                foreach (DataRow dr in dt.Rows)
                {
                    sb.Append("<tr>");
                    sb.Append(string.Format(@"<td height=""45"">{0}</td>", dr["Orderid"]));
                    sb.Append(string.Format("<td>{0}</td>", Convert.ToString(dr["status"].ToString()) == "1" ? "已付" : "未付"));
                    sb.Append(string.Format("<td>{0}</td>", dr["cName"].ToString()));
                    sb.Append(string.Format("<td  align='right'>{0}</td>", Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal(dr["OrderTotalPrice"].ToString()))));
                    sb.Append(string.Format("<td>{0}</td>", dr["UserName"].ToString()));
                    sb.Append(string.Format("<td>{0}</td>", dr["realname"].ToString()));
                    sb.Append(string.Format("<td>{0}</td>", dr["mobile"].ToString()));
                    sb.Append(string.Format("<td>{0}</td>", dr["paytime"].ToString()));
                    sb.Append("</tr>");
                }


            }
            else
            {
                Msg.Alert("对不起，没有可导出的订单数据！");
                return;
            }
        }
        sb.Append("</table>");
        if (flag == 0)
        {
            Utils.ExportToExcel("[" + DateTime.Now.ToShortDateString() + "]订单.xls", sb.ToString());
        }
        else
        {
            Utils.ExportToWord("[" + DateTime.Now.ToShortDateString() + "]订单.doc", sb.ToString());
        }
        #endregion
    }
    //编辑初始化
    private void initialEdit(int ID)
    {
        using (DataTable dt = DataFactory.GetDataTable("select top 1 b.cname,a.username,a.GoodsMoney,a.orderid  from KS_CosOrder  a  inner join KS_CosOrderItem b on a.orderid=b.orderid where a.status=0 and  a.id=" + ID + " and  b.business = '" + UserManage.GetUserInfo().UserName + "'"))
        {
            if (dt.Rows.Count > 0)
            {
                drr = dt.Rows[0];
            }
        }
    }
    //获取路径
    public string GetUrl(int ordertype, int courseID)
    {
        #region 连接地址
        string url = string.Empty;

        if (ordertype == 1)
        {
            url = BasicField.GetRewriteUrl("faceview", Utils.StrToInt(courseID));
        }
        else if (ordertype == 5)
        {
            url = BasicField.GetRewriteUrl("liveview", Utils.StrToInt(courseID));
        }
        else
        {
            url = BasicField.GetRewriteUrl("courseview", Utils.StrToInt(courseID));
        }
        return url;
        #endregion
    }
    //获取类型 
    protected string Gettype(int _type)
    {
        string Pass = string.Empty;
        switch (_type)
        {
            case 0:
                Pass = "网授";
                break;
            case 1:
                Pass = "面授";
                break;
            case 2:
                Pass = "限时";
                break;
            case 3:
                Pass = "团购";
                break;
            case 4:
                Pass = "积分";
                break;
            case 5:
                Pass = "直播";
                break;
        }
        return Pass;
    }
    // 筛选条件
    private void getParam()
    {
        sqlParam += " and b.SchoolID="+new TemporaryVar().UserID;
        int Status = Utils.StrToInt(KSCMS.S("Status"));
        if (!string.IsNullOrEmpty(KSCMS.S("Status")))
        {
            switch (Status)
            {
                case 1:
                    sqlParam += "  and datediff(day,[InputTime],getdate())=0 ";
                    break;
                case 0:
                    sqlParam += " and b.OrderType <>4 ";
                    break;
                case 2:
                    sqlParam += " and (a.status=1) AND (b.OrderType=0 OR b.OrderType=7)";
                    break;
                case 3:
                    sqlParam += " and (a.status=0) AND (b.OrderType=0 OR b.OrderType=7)";
                    break;
                case 4:
                    sqlParam += " and a.status=1 and b.OrderType=1 ";
                    break;
                case 5:
                    sqlParam += " and (a.status=0 )  and b.OrderType=1 ";
                    break;
                case 6:
                    sqlParam += " and a.status=1 and b.OrderType=5 ";
                    break;
                case 7:
                    sqlParam += " and a.status=0 and b.OrderType=5 ";
                    break;
            }
        }
        //搜索条件
        string key = KSCMS.S("KeyWord");
        if (!string.IsNullOrEmpty(KSCMS.S("KeyWord")))
        {
            key = Utils.ChkSQL(key);
            if (KSCMS.S("KeyWord") != "请输入关键字！")
            {
                switch (Convert.ToInt16(KSCMS.S("Condition")))
                {
                    case 1:
                        sqlParam += " AND a.OrderID like'%" + key + "%'";
                        break;
                    case 2:
                        sqlParam += " AND b.cName like'%" + key + "%'";
                        break;
                    case 3:
                        sqlParam += " And a.UserName like'%" + key + "%'";
                        break;
                    case 4:
                        sqlParam += " And a.realname like'%" + key + "%'";
                        break;
                    case 5:
                        sqlParam += " AND a.Mobile Like '%" + key + "%'";
                        break;
                }
            }
            //sqlParam += " and UserName like '%" + this.TextBox1.Text + "%'";
        }
        #region 日期搜索
        string beginDate = KSCMS.S("TxtBeginDate");
        string endDate = KSCMS.S("TxtEndDate");
        if (!string.IsNullOrEmpty(beginDate) && !string.IsNullOrEmpty(endDate))
        {
            if (Utils.IsDateTime(beginDate) && Utils.IsDateTime(endDate))
            {
                sqlParam += " AND a.paytime>='" + beginDate + "' and a.paytime<='" + Convert.ToDateTime(endDate).AddDays(1) + "'";
            }
        }
        #endregion
    }

</script>
<script src="../../ks_inc/DatePicker/WdatePicker.js"></script>
   <script>     
       function addSt(id) {
           window.open('User_CsShowUser.aspx?name=' + id, '用户信息', "width=370,height=220");
       }
 </script>
  <script>
      function SetDate() {
          var today = new Date();
          if ($("#showdate").is(":hidden")) {
              $("#showdate").show();
              $('#TxtBeginDate').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
              $('#TxtEndDate').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
          }
          else {
              $("#showdate").hide();
              $('#TxtBeginDate').val('');
              $('#TxtEndDate').val('');
          }
      }
      function keyWordFocus() {
          if (jQuery("#KeyWord").val() == '请输入关键字！') {
              jQuery("#KeyWord").val('');
          }
      }
      function keyWordBlur() {
          if (jQuery("#KeyWord").val() == '') {
              jQuery("#KeyWord").val('请输入关键字！');
          }
      }
      function Cuidan(orderid) {
          var duanxin=<%=DuanXinTiaoshu%>;
          if (parseInt(duanxin) <= 0) {
              KesionJS.Alert('短息条数不足请充值！', 'location.href="/user/Enterprise/UserEpDuanxin.aspx";');
          }
          else {
              jQuery.dialog.open("/user/Enterprise/UserEpCuiDan.aspx?orderid=" + orderid, { lock: true, fixed: true, title: "<div style='text-align:left'>短息催单设置</div>", width: 800, height: 400, max: false, min: false });
          }
      }
   </script>
<% if(KSCMS.S("action")==""){ %>
 <div ID="ListPanel"  Width="100%">
  <div class="t_tybox">
    
    <div class="tytitle clearfix"><h4 class="fl lf">订单管理</h4>
        <form action="/plus/Course/ImportExcel.aspx" method="post">
            <input type="hidden" name="export" value="export" />
        <input type="submit" ID="ExcelBtn"  value="本页导出Excel"   class="addbtn"/>
          
            <textarea style="display:none" name="param" id="param">  <%getParam();%><%=sqlParam %></textarea>
        </form>
        <div class="top_c_sc datestyle mt10">
        <form action="{$GetCurrUrl}" method="post">
           <span> <strong>快速搜索：</strong></span>
              <select name="Condition" ID="Condition" >
                    <option Value="1" <%=KSCMS.S("Condition")=="1"?"selected":"" %>>订单编号</option>
                    <option Value="2" <%=KSCMS.S("Condition")=="2"?"selected":"" %>>课程名称</option>
                    <option Value="3" <%=KSCMS.S("Condition")=="3"?"selected":"" %>>购买学员</option>
                    <option Value="4" <%=KSCMS.S("Condition")=="4"?"selected":"" %>>姓名</option>
                    <option Value="5" <%=KSCMS.S("Condition")=="5"?"selected":"" %>>联系电话</option>
              </select>
                <input type="text" name="KeyWord" ID="KeyWord" value="<%=KSCMS.S("KeyWord")==""?"请输入关键字！":KSCMS.S("KeyWord") %>" Class="textbox"  onfocus="keyWordFocus();" Width="200" onblur="keyWordBlur();" style="color:#ccc" ></input>
                
                <span id="showdate" <%if (KSCMS.S("TxtBeginDate") == "")
                                      { %> style="display: none" <%} %>>
                    <input type="text" name="TxtBeginDate" ID="TxtBeginDate" value="<%=KSCMS.S("TxtBeginDate") %>" placeholder="格式：YYYY-MM-DD" Width="120px"  onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" Class="textbox Wdate"></input><span style="margin-left:10px">至</span>
                   <input type="text" name="TxtEndDate" ID="TxtEndDate" value="<%=KSCMS.S("TxtEndDate") %>" placeholder="格式：YYYY-MM-DD" Width="120px"  onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" Class="textbox Wdate"></input>
                </span>
                <input type="submit" ID="Button4"  value=" 搜索 " Class="button" style="margin-left:10px;border:1px solid #dce2e4;border-radius:3px;"/>
                <b onclick="SetDate()" style="cursor: pointer; margin-left:10px;">日期范围？</b>
        </form>
    </div> 
    </div>    
      <div class="clear blank10"></div>
     <div class="tabs">
        <ul class="clearfix">
            <li <%=KSCMS.S("Status")==""?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList") %>"><span>所有订单</span></a></li>
            <li <%=KSCMS.S("Status")=="1"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-1") %>">今日订单</a></li>
            <li <%=KSCMS.S("status")=="2"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-2") %>"><span>点播已付款</span></a></li>
            <li <%=KSCMS.S("status")=="3"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-3") %>"><span>点播未付款</span></a></li>
            <li <%=KSCMS.S("status")=="4"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-4") %>"><span>面授已付款</span></a></li>
            <li <%=KSCMS.S("status")=="5"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-5") %>"><span>面授未付款</span></a></li>
            <li <%=KSCMS.S("status")=="6"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-6") %>"><span>直播已付款</span></a></li>
            <li <%=KSCMS.S("status")=="7"?" class='puton'":string.Empty %>><a href="<%=BasicField.GetUserUrl("order/User_CsOrderList","status-7") %>"><span>直播未付款</span></a></li>
        </ul>
    </div>
           <table id="tablist" width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
            <tr align="center" class="title">
                <td width="6%" align="center">状态</td>
                <td >课程名称</td>
                <td width="15%" align="center" >订单号</td>
                <td width="8%">成交价</td>
                 <td width="8%">提现价</td>
                <td width="8%">购买学员</td>
                <td  width="8%">姓名</td>
                <td  width="10%">电话</td>
                <td width="10%">购买时间</td>              
                <td width="10%">操作</td>              
              </tr>
                  <%
                      getParam();
                      using (DataTable dt = DataFactory.GetPage("b.Courseid,b.CName,b.ordertype,b.OrderTotalPrice,b.UserName,a.realname,a.mobile,a.GoodsMoney,b.Freight,a.Status,a.IsAnonymous,a.id,a.OrderID,a.InputTime", "KS_CosOrder a inner join KS_CosOrderItem b on a.orderid=b.orderid " + sqlParam, "a.id", " order by  a.id desc,a.InputTime desc", PageIndex, pagesize, out recordcount, out pagecount))
                      {
                          if (dt.Rows.Count > 0)
                          {
                              foreach (DataRow dr in dt.Rows) 
                              {
                              %>
                                 <TR class="tdbg sort bar">              
                                <td style="display:none">	
					                     <input type="checkbox" style='display: <%=Convert.ToString(dr["status"])== "1" ? "none" : "inline"%>' name="ids" id="ids" value="<%=dr["id"] %>" />
				                </td>
				                 <td>	
				                 <%= Convert.ToString(dr["status"])== "1" ?"<font color=green>已付</font>":"<font color=red>未付</font>" %> 
                               </td>
				                 <td style="text-align:left; padding:10px;">   <a href="<%= GetUrl(Convert.ToInt16(dr["ordertype"].ToString()),Convert.ToInt32(dr["Courseid"].ToString())) %>" target="_blank" style="color:#647171;font-size: 12px;"> <%= dr["CName"] %></a>

                                     ( <%=Gettype(Convert.ToInt16(dr["ordertype"].ToString())) %>)
				                 </td>
                                <td >				
				                 <div class="tips" style="text-align:center; color:#0aacb2"><%=dr["OrderID"] %> </div>				
				                </td>
                                 <td >
				                   <div class="price_cor">¥<%=Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal( dr["OrderTotalPrice"]))%></div>	
				                </td>
				                 <td >
				                   <div class="price_cor">¥<%=Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal( dr["Freight"]))%></div>	
				                 </td>
			                    <td >
                                   <div class="tips" style=" text-align:center">
                                      <a href="javascript:;"  onclick="addSt('<%=dr["UserName"] %>')"><%= dr["UserName"] %></a>                   
                                   </div>
                                </td>
                                 <td>
                                 <div class="tips" style=" text-align:center">
                                     <%= dr["realname"] %>
                                  </div>
                                 </td>
                                 <td>
                                 <div class="tips" style=" text-align:center">
                                     <%= dr["mobile"] %>
                                  </div>
                                 </td>
                                  <td >
				                    <%= dr["InputTime"]%>	
				                </td>
                                   <td class="splittd Ctd" align="center">
                   		                <div class="gl_btn">
                                            <span style="width:33.3%">
                                                <%= dr["status"].ToString()=="0"?"<a  href=\""+BasicField.GetUserUrl("order/User_CsOrderList","action-modify,orderid-"+dr["id"].ToString())+"\"><i class=\"iconfont\">&#xe61d;</i>编辑</a>":""%>
                                            </span>
                                            <span style="width:33.3%" <%= dr["status"].ToString()=="0"? "":"hidden" %> ><a Class="delete" href='<%=BasicField.GetUserUrl("order/User_CsOrderList","action-delete,ids-"+dr["id"]) %>'  OnClick="return(confirm('确定删除该订单吗?'));"><i class="iconfont">&#xe731;</i>删除</a></span>
                                         <%=Convert.ToString(dr["status"])== "1"?"":ep.GetEpConfig("Setting",7)=="1"&&IsCuiDan==1?"<span style=\"width:33.3%\" ><a href=\"javascript:Cuidan('"+dr["id"] +"')\"><i class=\"iconfont\">&#xe644;</i>催单</a> </span>":"" %> 
                                        </div>
                                    </td>
			                 </TR>
               <%
                                  if (KSCMS.S("Status") == "0")
                                  {
                                      sum = sum + (Utils.StrToFloat(dr["Freight"].ToString()) * Utils.StrToFloat(dr["IsAnonymous"].ToString())); //商品价格
                                  }
                                  else
                                  {
                                      sum = sum + Utils.StrToFloat(dr["Freight"].ToString()); //商品价格
                                  }
                                  if (Utils.StrToInt(dr["ordertype"].ToString()) == 4)
                                  {
                                      sum = 0;
                                  }
                              }
                              %>
               <TR class="tdbg sort bar"  >
                <td style="text-align:right; padding-right:20px; padding:20px 10px"  colspan="9">
                合计：<span ID="Lab"  style=" font-size:30px;color:#f04437"><%="￥" + Kesion.APPCode.Public.ReturnShopPrice(sum.ToString()) %></span>
                </td> 
               </tr> 
               <%
                          }
                          else 
                          {
                              KSCMS.W(@"<tr class=""tdbg"" >
                                        <td class=""Ctd"" style=""text-align:center"" colspan=""9"">
                                            <div class=""empty"">没有任何订单</div>
                                        </td>
                                        </tr>");
                          }
                      }
                       %>
           </table>

      
        <div class="fy_box" >
              <%
            #region 分页
            string PageStr = "[KS:PageStr1]";
            BasicField.ReplaceFilterPage(ref PageStr, PageIndex, pagesize, pagecount, recordcount);
            KSCMS.W(PageStr);
            #endregion
         %>
        </div>
        <div class="clearfix"></div>
     </div>
</div>
  <div ID="Panel1"  Width="100%">
		   <div style="padding:10px 0px 0px">
			<script type="text/javascript">
			    showtips(' <span>操作说明：<br /></span><span class="tips_cor" style="display:block;margin-top:5px;">已付款的订单不能删除！</span>');
			</script>
			</div>
       </div>
<%} if(KSCMS.S("action")=="modify"){ %>
 <div ID="AddPanel"  Width="100%">
       <script src="../../ks_inc/weiboApi.js"></script>
        <div class="tab-page" id="sjPanel">
         <script type="text/javascript">
             var tabPane1 = new WebFXTabPane(document.getElementById("sjPanel"), 1)
         </script>
             <form method="post" action="{$GetCurrUrl}"> 
                 <input type="hidden" name="update" value="update" />
           <div class="t_tybox">  
             	<div class="ty_title">修改订单</div>
     <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="border"> 
     
     <tr>
        <td align="right" class="lefttd" height="30" width="120">课程名称：</td>
         <td class="tag_left">
             <span ID="Label1" ><%=GetVal("cname") %></span>
         </td>
     </tr>
     
     <tr>
        <td align="right" class="lefttd" height="30" >最终价格：</td>
         <td class="tag_left"><input type="text" name="GoodsMoney" ID="GoodsMoney" value="<%=Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal(GetVal("GoodsMoney"))) %>" Class="textbox nopadtext"  Width="80px"></input> 元</td>
     </tr>  
     <tr>
        <td align="right" class="lefttd" height="30" >购买学员：</td>
         <td class="tag_left">
             <span ID="Label2" ><%=GetVal("username") %></span>
         </td>
     </tr>
      <tr>
        <td align="right" height="30" class="lefttd">订单编号：</td>
         <td class="tag_left">
             <span ID="Label3" ><%=GetVal("orderid") %></span>
          </td>
     </tr>    
  </table>
    <div class="cz_btn nofloat" style="padding-left:120px">
    	<span><input type="submit"  ID="Button2" OnClick="return(CheckForm())" Class="button"  value="确定修改(O)"  /></span>
        <span><input type="button" class="button" onclick="window.history.go(-1);"value=" 返 回 "></span>
     </div>
  
  	</div>
            </form>
     </div>
 </div>
<%} %>




