<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Admin.Vendue.UI_List"  GameType="1"   CodePage="65001"  PathLevel="1" PageFileFlag="Vendue_1_List" PageFileTitle="竞拍管理" DataBindingType="1" PageFlagId="1"   %>


<%@ Register TagPrefix="Site" TagName="Menu" Src="../WUC/Site_Menu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "后台管理 - 竞拍管理" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs" PathLevel="1" />
<Site:Menu id="menu_headcss" runat="server" Flag="HeadCss" PathLevel="1" />
<script type="text/javascript" charset="utf-8" src="/paipaijs/dialoguser.js"></script>

<script>
function ChooseUser1(UserId, SpanId,InputId,ChooseType)
{
	var _dlgId = "Dom_ProducctChoose_Dlg";
	var s = jQuery("#inputSelectText").val();
	var _url="../Dialog/getDialogData_2.aspx";
	var _data={"InfoId":UserId,"SpanId":SpanId,"InputId":InputId,"ChooseType":ChooseType, "DialogId":_dlgId,"unnc":s,"p":1};
	Common.EditFunction("GET",_url,_data,_dlgId,"商品选择11");
    //if(__dlgDD) __dlgDD.init();
}

//ChooseUser1(<%//=FromUserId%>,'Span_UserId_From','FromUserId',1);

function AjaxUpdateUI(id,Vid)
{
	jQuery.ajax({
		type: "POST",
		url: "../EmailSend/Update.aspx?IsAdd=20",
		data:{"VendueID":Vid,"id":id},
		cache: false,
		success: function(msg){
			Common.EditDialg ("EmailSendUpdate","批量发邮件管理 - 编辑",msg);
			if(jQuery("#IsChecked").val()==1)Common.EditDialgAddButtonEvent("EmailSendUpdate",'',null);
			else Common.EditDialgAddButtonEvent("EmailSendUpdate",'确定',SaveSub);
		}
	});
	//将本行设置为选中颜色
//	SetActive(Vid);
}

function edit_address2(id){
//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="Update_2_Bk.aspx?IsAdd=1";
var _data = {"Vid":id};	
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:转秒杀添加","SaveSub");	
//将本行设置为选中颜色
SetActive(id);
}


//编辑
function Edit_Info(id)
{

//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="update.aspx?IsAdd=1";
var _data = {"Vid":id};	
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:编辑","SaveSub");	
//将本行设置为选中颜色
SetActive(id);
}




//删除
function Del_Info(id){	
//弹出框ID,标题，内容，删除程序执行路径，参数表
var _url =  "update.aspx?IsAdd=3";
var _data ={"Vid":id,GameType:1};
Common.ConfirmDelete2 ("POST",_url,_data,"<%=PageFileFlag%>","删除确认","");
SetActive(id);		
}


//11:43 2010-9-29
$(document).ready(function()
{
//	client_SetPageNo(<%=intPageNo%>);//记录页码
});
function DownLogFile(Vid ,url)
{
//弹出框ID，标题，显示内容，OK操作，取消操作
Common.Confirm ("DownLogFile","会员参与日志下载","是否确定下载？",function(){Common.GoTo(url);},"");

//将本行设置为选中颜色
SetActive(Vid);	
return false;
}

</script>


</head>
<body>

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  />
<div class1="wrap" id="wrap">
	<Site:Menu id="Wuc_LeftMenu" runat="server" Flag="LeftMenu" PageFileFlag="Menu_A_800_801" PathLevel="1" />	
	<div class1="mainbox" class="MainBox W1100 ">
		<div class="PGTitle LH30 ">
			<div class="W200 FL MGL10 FWB FS12"><%=PageFileTitle%></div>
			<div class="ChileMenu1 FL FS12">
			</div>
			<div class="Clear"></div>
		</div>
		<div class="ContBox MGT10 " >

<table class="Table FS12 ">

<tr style="height:30px;	font-weight: bold;">
<!--
<TH style="width:30px">序号</TH>-->
<TH style="width:60px">期号</TH>
<TH style="width:150px">商品名称</TH>
<TH style="width:70px">产品图片</TH>
<TH style="width:100px">成拍时间</TH>
<TH style="width:80px">当前价</TH>
<TH style="width:130px">增加时间/增加金额</TH>
<TH style="width:70px">参与次数</TH>
<TH style="width:70px">可用状态</TH>
<TH style="width:70px">时间封顶</TH>
<TH style="width:70px">推荐</TH>
<TH style="width:70px">竞拍状态</TH>
<TH style="width:70px">机器人</TH>
<TH style="width:70px;display:none;">秒杀设置</TH>
<TH style="width:130px">操作</TH>
</tr>

<asp:Repeater id="rpList" runat="server">
<ItemTemplate>
<tr  id="tr_<%#Eval("Vendueid")%>">
<!--	<td><%=(++DtRowIndex)%></TD>   -->
		<td  title="自动编号<%#Eval("Id")%>" ><%#Eval("VendueId")%></td>
		<TD title="<%# (Eval("ProductName").ToString()=="1"?"体验区拍品":"")%>"><%#Eval("ProductName")%><%# (Eval("IsTestType").ToString()=="1"?"<font color='#FF9900'>(体验区)</font>":"")%></td>
		
		<td title="<%#Eval("ProductPhotoPath")%>" style="text-align:center"> <img  src="<%# DV.EvalImage(Eval("ProductPhotoPath"),"/images/DefaultPic_1.JPG")%>" style="width:60px;height:45px"  /></td>
		<td><%#Eval("RealStopTime","{0:yyyy-MM-dd  HH:mm:ss}")%></td>
		<td><%#SetMoneyFormat(Eval("RealPrice"))%></td>
		<td><%#Eval("addSecond")%>秒 / &yen;<%#WinLibClass.Common.Utils2.SetMoneyFormat(Eval("AddPrice"))%></td>
		<TD><%#Eval("VendueCount")%></td>		
		
		<td >
		<%#Eval("GameRuleType").Equals(-1)?"<font color='red'>↓</font>":"<font color='green'>↑</font>"%> 
		<%#Eval("IsChecked").Equals(1)?"<font color='green'>启用</font>":"<font color='red'>停用</font>"%></td>
		<td ><%#Eval("isaddsecondmax").Equals(1)?"<font color='green' title=\""+ Eval("addsecondmax") +"秒封顶\">"+ Eval("addsecondmax") +"秒</font>":"<font color='black' >不启用</font>"%></td>
		<td style="font-family:黑体"><%#GetOrderIdFormat(Eval("OrderId"))%></td>
		<td ><%# WinLibClass.Common.Utils.StrToInt( Eval("VendueState").ToString(),0)>=3?"<font color='green'>成功</font>":"<font color='red'></font>"%></td>

		
		<td><a href="javascript:" onclick="Alert('此版本为免费版,不支持此项功能，请联系官方购买授权版，郑州全搜索官方网站：www.paipaicms.com')"><%#(Eval("IsHot").Equals(1)|| Eval("IsHot").Equals(0))?"管理":""%></a></td>
		
		
		<td style="display:none;"><a href="javascript:" onclick="edit_address2(<%#Eval("VendueId")%>);">管理</a></td>
		
		<td>
			<a onclick="Edit_Info('<%#Eval("VendueId")%>')" >编辑</a>
			
			<a onclick="Del_Info('<%#Eval("VendueId")%>')" >删除</a>

			<a href="/Auction/LogFileDownload.aspx?GameType=1&id=<%#Eval("VendueId")%>" onclick="return DownLogFile(<%#Eval("VendueId")%>,'/Auction/LogFileDownload.aspx?GameType=1&id=<%#Eval("VendueId")%>');" class="Hide1" title="下载参与者名单">下载..</a>

			
		</td>
</tr>
</ItemTemplate>
</asp:Repeater>


</table>

		</div>
		<div class="ContBox" >
			<div class="page" style="margin-left:-13px;"><%=strPageInfo%>  -  <a href="#"onclick="Edit_Info();return false;"  class="A_Add">添加</a> 
			</div>
		</div>
	</div>
</div>

<div class="clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />
</body>
</html>




<script language="C#" runat="server">

        public string GetOrderIdFormat(object obj)
        {
            string strReturn = "";
            if (obj == null) return "";
            int order = WinLibClass.Common.Utils.StrToInt(obj.ToString(),0);
            if(order<1) {}
			else if(order<4)	strReturn = "<font class='OptionStar Star1'>" + order + "星</font>";
			else if(order>= 4 && order<7) strReturn = "<font class='OptionStar Star2'>" + order + "星</font>";
			else strReturn = "<font class='OptionStar Star3'>" + order + "星</font>";
            return strReturn;
        }

</script>

