<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Maticsoft.Web.order.index" %>
<%@ OutputCache Duration="1" VaryByParam="none"%>
<%@ Register src="../UserControls/CFooterControl.ascx" tagname="CFooterControl" tagprefix="uc1" %>
<%@ Register src="../UserControls/CHeaderControl.ascx" tagname="CHeaderControl" tagprefix="uc2" %>

<%@ Register src="../UserControls/blockaboutorder.ascx" tagname="blockaboutorder" tagprefix="uc3" %>

<%@ Register src="../UserControls/MyWebside.ascx" tagname="MyWebside" tagprefix="uc4" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    
    <uc2:CHeaderControl ID="CHeaderControl1" runat="server" />

    <div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<uc4:MyWebside ID="MyWebside1" runat="server" />
	</div>
    <div id="content" class="coupons-box clear">
		<div class="box clear">
            
            <div class="box-content">
                <div class="head">
                    <h2>我的订单</h2>
                    <ul class="filter">
						<li class="label">分类: </li>
						<li <%=GetStyle("",pay) %>><a href="index.aspx?pay=">全部</a> </li>
                        <li <%=GetStyle("unpay",pay) %>><a href="index.aspx?pay=unpay">未付款</a> </li>
                        <li <%=GetStyle("pay",pay) %>><a href="index.aspx?pay=pay">已付款</a> </li>
					</ul>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
						<tr><th width="380">项目名称</th><th width="60">数量</th><th width="60">总价</th><th width="60">状态</th><th width="60">操作</th></tr>
				
                    <%int i = 0; %>
                    <%foreach (Maticsoft.Model.Order ordermodel in orderlist)
                      {%>
                     

						<tr <%if(i%2!=0){%> class='alt'<%} %>>
							<td style="text-align:left;"><%= GetTeam(ordermodel.Team_id.ToString(),ordermodel.Id.ToString())%></td>
							<td><%=ordermodel.Quantity %></td>
							<td><span class="money"></span><%=ordermodel.Origin %></td>
							<td>
                            
                            <%if(ordermodel.State=="pay")
                            {%>
                            已付款
                            <%}
                              else if (Gettuan(Convert.ToInt32(ordermodel.Team_id.ToString()), ordermodel.State))
                              { %>
                           已过期
                            <% }
                              else
                              {
                                  if (result == true)
                                  {
                                  %>
                            已过期
                            <%
                                }
                                  else
                                  {%>
                                  未付款
                                  <%}
                              }%>
                            </td>
							<td class="op">
                            <%if (ordermodel.State == "pay")
                              {%>

                            <a href="/order/view.aspx?userid=<%=ordermodel.User_id %>&id=<%=ordermodel.Id %>">详情</a>
                            <%}else if(Gettuan(Convert.ToInt32(ordermodel.Team_id.ToString()),ordermodel.State))
                              
                              { %>
                           
                          

                            <%}
                              else
                              { %>
                              <%if (ordermodel.Team_id == 0 || ordermodel.Team_id == null)
                                {
                                    if (!result)
                                    {
                                        
                                   %>
                                
                                 <a href="/shopcart/confirmation.aspx?userid=<%=ordermodel.User_id %>&orderid=<%=ordermodel.Id %>">付款</a>
                              <%  }
                                }
                                else
                                {
                                    if (!result)
                                    {%>
                             <a href="/order/check.aspx?userid=<%=ordermodel.User_id %>&orderid=<%=ordermodel.Id %>">付款</a>
                             <% }
                                }%>

                            <%}%>
                            </td>
						</tr>
                        <% 
                      i++;
                      }%>
					
						<tr><td colspan="5"><%=strpage%></td></tr>
                    </table>
				</div>
            </div>
            
        </div>
    </div>
    <div id="sidebar">
		<uc3:blockaboutorder ID="blockaboutorder1" runat="server" />
      
    </div>
</div>

</div> <!-- bd end -->
</div> <!-- bdw end -->


    <uc1:CFooterControl ID="CFooterControl1" runat="server" />

    


    </form>
</body>
</html>
