<%@ page language="C#" autoeventwireup="true" inherits="Admin_GuidBuy_Operate, ShopNum1Deploy" %>

<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>

<%@ Register src="UserControl/ProductSelect.ascx" tagname="ProductSelect" tagprefix="uc1" %>

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="ShopNum1" %>

<!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 id="Head1" runat="server">
    <title>Untitled Page</title>
      <link type="text/css" rel="Stylesheet" href="css/index.css" />
    <style type="text/css">

.content {
 
}
.content .contentHeader {
  background-color:#BCC7E0;
  border:solid 1px #4B66A5;
  font-weight:bold;
}

.content .contentMain {
 border-left:solid 1px #4B66A5;
 border-top:solid 0px #4B66A5;
 border-right:solid 1px #4B66A5;
 border-bottom:solid 1px #4B66A5;
} 
        </style> 
    <script type="text/javascript">
    //选择单图
   function openSingleChild1()
    { 
        var k = window.showModalDialog("Image_List_Select.aspx",window,"dialogWidth:820px;status:no;dialogHeight:650px"); 
        if(k != null) 
        {
          var strLen=k.length;
          var lastIndex=k.lastIndexOf('/');
           var editor = FCKeditorAPI.GetInstance('FCKeditorDescription'); 
           {
             editor.InsertHtml("<img src='/" + k + "'>");
           }
        }
    } 
    var number =2;
    function change_option(index)
    {
        for (var i = 1; i <= number; i++) 
        {
          document.getElementById('current' + i).className = '';
          document.getElementById('content' + i).style.display = 'none';
        }
        document.getElementById('current' + index).className = 'current';
        document.getElementById('content' + index).style.display = 'block';
    }
       //选择单图
   function openSingleChild()
    { 
        var k = window.showModalDialog("Image_List_Select.aspx",window,"dialogWidth:820px;status:no;dialogHeight:650px"); 
        if(k != null) 
        {
          var strLen=k.length;
          var lastIndex=k.lastIndexOf('/');
          document.getElementById("TextBoxOriginalImge").value = k.substring(lastIndex+1,strLen); 
         document.getElementById("ImageOriginalImge").src = k; 
        }
    } 
    </script>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">   
    <asp:ScriptManager ID="scriptManagerMain" runat="server"/>
        <div style="text-align: center;">
            <div id="header">
                <ul>
                    <li id="current1" class="current"><a style="cursor: pointer;" onclick="change_option(1);">
                        <asp:Label runat="server" ID="tab01" Text="导购基本信息"  /></a></li>
                     <li id="current2"><a style="cursor: pointer;" onclick="change_option(2);">
                         <asp:Label runat="server" ID="tab02" Text="导购相关商品"  /></a></li>
                </ul>
                <br style="clear: both;" />
            </div>
<!-- *********************基本信息************************ -->
            <div id="content1" runat="server">
            <!-- 基本信息-->
                <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
            <tr>
                <td align="right" width="20%" >
                    <asp:Label ID="LabelName" runat="server" Text="导购名称："></asp:Label>
                    </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input2"></asp:TextBox>
                    <font color="red">
                            <asp:Label ID="Label7" runat="server" Text="*" ></asp:Label></font>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorName" 
                            runat="server" ControlToValidate="textBoxName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorName" 
                        runat="server" ControlToValidate="TextBoxName" Display="Dynamic" 
                        ErrorMessage="名称最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                    </td>
            </tr>
            <tr>
                <td align="right" >
                    <asp:Label ID="LabelOriginalImge" runat="server" Text="导购图片："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxOriginalImge" runat="server" CssClass="input2"></asp:TextBox>
                    <input id="ButtonSelectSingleImage" 
                    type="button" value="选择图片" onclick= "openSingleChild()"  />
                    <font color="red">
                    <asp:Label ID="Label8" runat="server" Text="*"></asp:Label>
                        </font>
                            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidatorName0" 
                            runat="server" ControlToValidate="TextBoxOriginalImge" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorOriginalImge" 
                        runat="server" ControlToValidate="TextBoxOriginalImge" Display="Dynamic" 
                        ErrorMessage="图片最多250个字符" ValidationExpression="^[\s\S]{0,250}$"></asp:RegularExpressionValidator>
                    <br />
                     <img id="ImageOriginalImge" alt="" src="~/images/noImage.gif" runat="server" /></td>
                    <br />
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelDescription" runat="server" Text="导购介绍："></asp:Label>
                </td>
                <td align="left" hegiht="40">
                   <input id="ButtonSelectSingleImage0" 
                    type="button" value="插入图片" onclick= "openSingleChild1()" class="input2"/><FCKeditorV2:FCKeditor ID="FCKeditorDescription" runat="server" Height="300px" Width="80%">
                    </FCKeditorV2:FCKeditor>
                </td>
            </tr>
                            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelIsShow" runat="server" Text="是否前台显示："></asp:Label>
                </td>
                <td align="left" >
                    <asp:CheckBox ID="CheckBoxIsShow" runat="server" Text="是" />
                                </td>
                            </tr>
                            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelOrderOrderID" runat="server" Text="排序号："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxOrderID" runat="server" CssClass="input2"></asp:TextBox>
                    <font color="red">
                            <asp:Label ID="Label9" runat="server" Text="*"></asp:Label>
                            </font>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorName1" 
                            runat="server" ControlToValidate="textBoxName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorMinimalCost2" 
                            runat="server" ControlToValidate="TextBoxOrderID" Display="Dynamic" 
                            ErrorMessage="输入格式不正确" 
                            
                            ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
            <tr>
                <td align="right" >
    
                    </td>
                <td align="left">
                    </td>
            </tr>
        </table>
            </div>

<!-- **********************************相关商品******************** -->         
            <div id="content2" runat="server" style="display: none;">
            <!-- 相关商品 -->
             <asp:UpdatePanel ID="updatePanel2" runat="server">
                <ContentTemplate>
                <uc1:ProductSelect ID="ProductSelect1" runat="server" />
                </ContentTemplate>
             </asp:UpdatePanel>
            </div>
            <br />
        <div class="btconfig">
    
            <asp:Button ID="ButtonConfirm" runat="server" Text="确定" 
                onclick="ButtonConfirm_Click" ToolTip="Submit"  CssClass="bt2"/>
<input id="inputReset" runat="server" type="reset" value="重置"  class="bt2"/>
                  <a href="GuidBuy_List.aspx"><img src="images/back.png" border="0" align="top" /></a> 
        <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
    
            
        </div>
        </div>
            <asp:HiddenField ID="hiddenGuid" runat="server" />
    </form>
</body>
</html>
