<%@ Page language="c#" Codebehind="MyComplaint.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.MyComplaint" %>
<%@ Register TagPrefix="uc1" TagName="MemberMenu" Src="Modules/MemberMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="MemberHelper" Src="Modules/MemberHelper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="memberfooter" Src="Modules/memberfooter.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<!--#include file="../../inc/encoding.inc"-->
		<title>我的投诉</title>
		<!--#include file="../../inc/head.inc"-->
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/member.css" type="text/css" rel="stylesheet" />
		<style type="text/css">
		    #menucontainer li { float:left; margin-right:20px; padding:0px 5px; height:25px; line-height:25px; cursor:pointer;}
		    #menucontainer li.tabon { background:#e6e6e6;}
		</style>
		<script src="<%=webSite %>inc/tab.js" type="text/javascript"></script>
		<script type="text/javascript">
		    $(document).ready(function(){
		        SetTab('li.menuitem','li.tabitem');
		    });
		</script>
	</HEAD>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-qgw clear">
		    <!--位置导航开始-->
		    <div class="path"><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a>&nbsp;&gt;&nbsp;<a href="<%=webSite %>Center.<%=config.html %>"><%=GetResourceString("MemberCenter")%></a>&nbsp;&gt;&nbsp;我的投诉</div>
		    <!--位置导航结束-->
			<div class="member_left">
				<!--会员中心导航开始-->
				<uc1:MemberMenu id="MemberMenu1" runat="server"></uc1:MemberMenu>
				<!--会员中心导航结束-->
			</div>
			<div class="member_middle_right">
				<!--内容开始-->
				<div class="mframe">
			        <div class="tl"></div>
			        <div class="tr"></div>
			        <div class="tm">我的投诉</div>
			        <div class="ml"></div>
			        <div class="mr"></div>
			        <div class="mm">					    
				        <form id="Form1" method="post" runat="server">
		                    <%if(Request.QueryString["CID"] == null){ %>
		                    <ul id="menucontainer" class="clear">
					            <li class="menuitem tabon">未完成的投诉</li>
					            <li class="menuitem tabout">已完成的投诉</li>
					        </ul>
					        <ul>
					            <li class="tabitem">
						             <asp:DataGrid id="dgList" CssClass="dgborder" runat="server" AutoGenerateColumns="False" DataKeyField="ComplaintID" Width="100%" HorizontalAlign="Center" BorderWidth="1"
		                                BorderColor="#d6d6d6">
		                                <ItemStyle BackColor="White"></ItemStyle>
		                                <HeaderStyle BackColor="#fff7d3" Height="20px"></HeaderStyle>
			                            <Columns>
				                            <asp:TemplateColumn HeaderText="投诉主题">
					                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <a href='MyComplaint-<%# DataBinder.Eval(Container.DataItem, "ComplaintID") %>.<%=config.html%>'><%# DataBinder.Eval(Container.DataItem, "Title") %></a>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="投诉类别">
					                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# DataBinder.Eval(Container.DataItem, "CatName") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="涉及订单">
					                            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# DataBinder.Eval(Container.DataItem, "OrderNo") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="投诉时间">
					                            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# DataBinder.Eval(Container.DataItem, "AddTime") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="状态">
					                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# (int)DataBinder.Eval(Container.DataItem, "Status") == 1 ? "已完成" : (DataBinder.Eval(Container.DataItem, "Reply").ToString() != "" ? "已答复" : "未答复") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
							            <asp:ButtonColumn Text="删除" HeaderText="删除" CommandName="Delete">
								            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
								            <ItemStyle HorizontalAlign="Center" Width="15%"></ItemStyle>
							            </asp:ButtonColumn>
			                            </Columns>
		                            </asp:DataGrid>   
					            </li>
					            <li class="tabitem">
					                <asp:DataGrid id="dgList2" CssClass="dgborder" runat="server" AutoGenerateColumns="False" DataKeyField="ComplaintID" Width="100%" HorizontalAlign="Center" BorderWidth="1"
		                                BorderColor="#e6e6e6">
		                                <ItemStyle BackColor="White"></ItemStyle>
		                                <HeaderStyle BackColor="#fff7d3" Height="20px"></HeaderStyle>
			                            <Columns>
				                            <asp:TemplateColumn HeaderText="投诉主题">
					                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <a href='MyComplaint-<%# DataBinder.Eval(Container.DataItem, "ComplaintID") %>.<%=config.html%>'><%# DataBinder.Eval(Container.DataItem, "Title") %></a>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="投诉类别">
					                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# DataBinder.Eval(Container.DataItem, "CatName") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="涉及订单">
					                            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# DataBinder.Eval(Container.DataItem, "OrderNo") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="投诉时间">
					                            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# DataBinder.Eval(Container.DataItem, "AddTime") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
				                            <asp:TemplateColumn HeaderText="状态">
					                            <HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
					                            <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
					                            <ItemTemplate>
						                            <%# (int)DataBinder.Eval(Container.DataItem, "Status") == 1 ? "已完成" : (DataBinder.Eval(Container.DataItem, "Reply").ToString() != "" ? "已答复" : "未答复") %>
					                            </ItemTemplate>
				                            </asp:TemplateColumn>
							            <asp:ButtonColumn Text="删除" HeaderText="删除" CommandName="Delete">
								            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
								            <ItemStyle HorizontalAlign="Center" Width="15%"></ItemStyle>
							            </asp:ButtonColumn>
			                            </Columns>
		                            </asp:DataGrid>
					            </li>
					        </ul>
		                    <br />
		                    <table cellpadding="0" cellspacing="0" border="0" class="tableinfo">
							    <tr>
							        <th class="th_title" colspan="2">提交我的投诉</th>
							    </tr>
							    <tr>
								    <th>投诉类别： </th>
								    <td><asp:DropDownList id="ddlCategory" runat="server"></asp:DropDownList></td>
							    </tr>
							    <tr>
								    <th>涉及订单：</th>
								    <td><asp:TextBox id="txtOrderNo" runat="server"></asp:TextBox></td>
							    </tr>
							    <tr>
								    <th>投诉主题：</th>
								    <td><asp:TextBox id="txtTitle" runat="server"></asp:TextBox></td>
							    </tr>
							    <tr>
								    <th>投诉内容： </th>
								    <td><asp:TextBox id="txtBody" runat="server" TextMode="MultiLine" Columns="80" Rows="5"></asp:TextBox></td>
							    </tr>
							    <tr>
								    <th colspan="2"><asp:Button id="btnSubmit" OnClick="btnSubmit_Click" runat="server" Text="提交"></asp:Button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="取消" onclick="javascript:history.go(-1);" /></th>
							    </tr>
						    </table>
		                        
		                    <%} else if(Request.QueryString["CID"] != null) {%>
		                    <table cellpadding="0" cellspacing="0" border="0" class="tableinfo">
							    <tr>
							        <th class="th_title" colspan="2">投诉信息</th>
							    </tr>
							    <tr>
								    <th>投诉类别： </th>
								    <td><%=detail.CatName %>&nbsp;</td>
							    </tr>
							    <tr>
								    <th>涉及订单：</th>
								    <td><%=detail.OrderNo %>&nbsp;</td>
							    </tr>
							    <tr>
								    <th>投诉主题：</th>
								    <td><%=detail.Title %>&nbsp;</td>
							    </tr>
							    <tr>
								    <th>投诉内容： </th>
								    <td><%=detail.Body %>&nbsp;</td>
							    </tr>
							    <tr>
				                    <th>投诉时间：</th>
				                    <td>
					                    <%=detail.AddTime%>&nbsp;</td>
			                    </tr>
							    <%if(detail.Reply != "") {%>
			                    <tr>
				                    <th>回复内容：</th>
				                    <td>
					                    <%=detail.Reply%>&nbsp;</td>
			                    </tr>
			                    <tr>
				                    <th>回复时间：</th>
				                    <td>
					                    <%=detail.ReplyTime%>&nbsp;</td>
			                    </tr>
			                    <%} %>
			                    <tr>
				                    <th>状态：</th>
				                    <td>
					                    <%if(detail.Status == 1){%>
					                        已完成
					                    <%}else if(detail.Reply != ""){ %>
					                        已答复
					                    <%}else{ %>
					                        未答复
					                    <%} %>
					                </td>
			                    </tr>
			                    <tr>
				                    <th>&nbsp;</th>
				                    <td>
					                    <a href='MyComplaint.<%=config.html%>'>返回</a></td>
			                    </tr>
						    </table>
		                    <%}%>
	                    </form>
	                </div>
			        <div class="bl"></div>
			        <div class="br"></div>
			        <div class="bm"></div>
			    </div>
				<!--内容结束-->
			</div>
			<div style="clear:both;"></div>
		</div>
		<uc1:MemberHelper id="Helper1" runat="server"></uc1:MemberHelper>
		<uc1:memberfooter id="Footer1" runat="server"></uc1:memberfooter>
	</body>
</HTML>
