<%@ page language="C#" autoeventwireup="true" inherits="Shop_Auction_ShopClassChoose, HoWaveVGO" title="商品分类选择" viewstateencryptionmode="Never" enableviewstatemac="false" validaterequest="false" enableEventValidation="false" %>
<html>
<body>
<div id="warp"  style=" margin:0 auto;width:760px;">
    <div id="head" style=" height:30px;">
        <div id="menu">
		    <ul id="menu_head"> 
		      <li><img src="../Images/Step_01_End.gif" align="absMiddle" hspace="10" />选择出售方式</li>
		      <li class="li_now"><img src="../Images/Step_02_Begin.gif" align="absMiddle" hspace="10" />选择商品分类</li>
		      <li><img src="../Images/Step_03_End.gif" align="absMiddle" hspace="10" />填写商品详情</li>
		    </ul>
	    </div>    
    </div>
    <div style=" height:13px; line-height:13px;width:760px;  border-top:solid 3px #ff9900; background:url(../Images/graybar.gif)">&nbsp;</div>
        <form id="form1" runat="server">
         <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
            <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
	           <tr>
	              <td width="300" align="left" scope="col">
	                  <asp:Image ID="SellProductPic" Width="243px" Height="74px" runat="server" />	      
	              </td>
	              <td scope="col">
	                  <div class="readtome">
	                     <span style="color:#D63004;font-weight:bold;">温馨提醒：</span>请核对您发布的商品是否符合最新商品发布规则；没通过实名认证的会员,发布的商品将会暂时放入仓库，认证通过后即可上架。 
                            <a href="../Credit/identify_choose.aspx">认证请这边走</a>
	                 </div>
                  </td>
	          </tr>
           </table>
          <div style="clear:both;"></div>
          <div id="select_content">
                <div id="select_title" style=" text-align:left;">请选择商品的类目</div>
                <asp:Panel ID="CustomerClass" runat="server" Visible="false"  Style=" text-align:left;">
                   你经常选择的类目：<asp:DropDownList ID="CustomerClassSelect" runat="server" AppendDataBoundItems="true"  AutoPostBack="true" OnSelectedIndexChanged="CustomerClassSelect_Change"><asp:ListItem /></asp:DropDownList>
                </asp:Panel>
                <div class="select_style">
                   <asp:ListBox ID="ListBox1" runat="server" CssClass="select_box" AutoPostBack="True" DataSourceID="ObjectDataSource1" DataTextField="ClassName" DataValueField="ClassID" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged" />
                </div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
                   <ContentTemplate>
                     <div class="select_style">
                       <asp:ListBox ID="ListBox2" runat="server" CssClass="select_box" AutoPostBack="True" DataSourceID="ObjectDataSource2" DataTextField="ClassName" DataValueField="ClassID"  OnDataBinding="ListBox2_DataBinding" OnSelectedIndexChanged="ListBox2_SelectedIndexChanged"/>
                    </div>
                   </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="ListBox1" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                      <ContentTemplate>
                          <DIV class="select_style">
                              <asp:ListBox id="ListBox3" runat="server" OnSelectedIndexChanged="ListBox3_SelectedIndexChanged" DataValueField="ClassID" DataTextField="ClassName" DataSourceID="ObjectDataSource3" AutoPostBack="True" CssClass="select_box" OnDataBinding="ListBox3_DataBinding" ></asp:ListBox>
                          </DIV>
                      </ContentTemplate>
                      <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="ListBox2" EventName="DataBinding"></asp:AsyncPostBackTrigger>
                      </Triggers>
                </asp:UpdatePanel>    
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                  <ContentTemplate>
                      <DIV class="select_style"><asp:ListBox id="ListBox4" runat="server" OnSelectedIndexChanged="ListBox4_SelectedIndexChanged" DataValueField="ClassID" DataTextField="ClassName" DataSourceID="ObjectDataSource4" AutoPostBack="True" CssClass="select_box" ></asp:ListBox> </DIV>
                  </ContentTemplate>
                    <Triggers>
                       <asp:AsyncPostBackTrigger ControlID="ListBox3" EventName="DataBinding"></asp:AsyncPostBackTrigger>
                    </Triggers>
                </asp:UpdatePanel>
          </div>
          <table id="select_result" style="width:760px; clear:both; ">
              <tr>
                  <td width="80">你选择的是：</td>
                  <td style="text-align:left;">
                      <asp:UpdatePanel ID="UpdatePanel4" runat="server"  >
                           <ContentTemplate>
                              <asp:Label id="WhatYouChoose" runat="server" CssClass="SelectChooseStyle"  /> 
                              <asp:HiddenField ID="h_c_p_classID" runat="server" />
                           </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="CustomerClassSelect" EventName="SelectedIndexChanged" />
                           </Triggers>
                      </asp:UpdatePanel>
                  </td> 
              </tr>
          </table> 
          <div style=" text-align:center; margin:10px 0px 15px" >      
              <input type="button" onclick="checkSubmit()" value="选好了，继续" id="ChooseSuccesButton" />
          </div>
 <script type="text/javascript">
 document.getElementById("ChooseSuccesButton").disabled=true;
 function CheckChooseEnd(ctlname){ 
   var rowIndex=document.getElementById(ctlname).selectedIndex;
   var selectname=document.getElementById(ctlname).options[rowIndex].innerText;
   var _button=document.getElementById("ChooseSuccesButton");
   if(selectname.indexOf("->") == -1 )
    { 
       _button.disabled=false;
    }
    else
    {
       _button.disabled=true;
    }     
   
 }
  function AutoSelectClass(itemName)
  {    
     var button= document.getElementById("ChooseSuccesButton");
     var showClass=document.getElementById("WhatYouChoose");
     if(itemName!="")
     {
       // showClass.innerHTML=itemName;
        button.disabled=false;
      } 
      else
      {
        //showClass.innerHTML="";
         button.disabled=true;
      }  
        
  } 
  function checkSubmit()
  {
     var selectClassName=document.getElementById("WhatYouChoose").innerHTML;
     selectClassName=selectClassName.replace("&nbsp;","");
     selectClassName=selectClassName.replace("&nbsp;","");
     selectClassName=selectClassName.replace("&nbsp;","");
     selectClassName=selectClassName.replace("&nbsp;","");
     var goType=document.getElementById("h_Request");
     var goUrl="ShopSaleProduct.aspx";
     
     var postClassName=document.getElementById("h_c_p_className");
     postClassName.value=selectClassName;
     if(goType.value=="1")
     {
        goUrl="shop_request_product.aspx";
     }     
      var _form=document.forms[0]; 
     _form.action=goUrl;
     _form.method="post";
     _form.target="_self";
     _form.submit();
    
  }
</script>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllChildClassByParnetID" TypeName="Shop_Class">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="ParentID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetAllChildClassByParnetID" TypeName="Shop_Class">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox1" DefaultValue="-1" Name="ParentID" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetAllChildClassByParnetID" TypeName="Shop_Class">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox2" DefaultValue="-1" Name="ParentID" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" SelectMethod="GetAllChildClassByParnetID"
        TypeName="Shop_Class">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox3" DefaultValue="-1" Name="ParentID" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="h_c_p_changeclass" runat="server" Value=""/>
    <asp:HiddenField ID="h_c_p_name" runat="server" />
    <asp:HiddenField ID="h_c_p_type" runat="server" />
    <asp:HiddenField ID="h_c_p_desc" runat="server" />
    <asp:HiddenField ID="h_c_p_auction_price" runat="server" />
    <asp:HiddenField ID="h_c_p_auction_standprice" runat="server" />
    <asp:HiddenField ID="h_c_p_standprice" runat="server" />
    <asp:HiddenField ID="h_c_p_teamprice1" runat="server" />
    <asp:HiddenField ID="h_c_p_teamprice2" runat="server" />
    <asp:HiddenField ID="h_c_p_teamprice3" runat="server" />
    <asp:HiddenField ID="h_c_p_teamprice4" runat="server" />
    <asp:HiddenField ID="h_c_p_teamprice5" runat="server" />
    <asp:HiddenField ID="h_c_p_teamtype" runat="server" />
    <asp:HiddenField ID="h_c_p_stocks" runat="server" />
    <asp:HiddenField ID="h_c_p_province" runat="server" />
    <asp:HiddenField ID="h_c_p_city" runat="server" />
    <asp:HiddenField ID="h_c_p_className" runat="server" />
    
    <asp:HiddenField ID="h_Request" runat="server" />
        </form>
           
   </div>
</body>
</html>
    





