<%@ Page Title="" Language="VB" MasterPageFile="~/App_MasterPage/mpManager.master" AutoEventWireup="false" CodeFile="HouseInfo.aspx.vb" Inherits="Manager_House_HouseInfo" %>
<%@ Register assembly="ControlPageing" namespace="ControlPageing" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="chpPageTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="chpHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chpScript" Runat="Server">
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/jquery.min.js"></script> 
    <script type="text/javascript" src="/App_Themes/ManagerTheme/js/lhgdialog.min.js"></script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="chpTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="chpContent" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View_Edit" runat="server">
         <script language="javascript" type="text/javascript">
            function txtBoxClick(objtxtBox) {
                $.dialog({
                    lock: true,
                    title: '选择文件',
                    content: 'url:/Manager/House/ViewFiles.htm',
                    width: '800px',
                    height: '500px',
                    max: false,
                    min: false
                });
            }
            function callBack(filePath) {
                $('#dplFileName').html('');
                if (filePath != null && filePath != '') {
                    var fileName = filePath.split(',');
                    $('#<%=hfFileList.ClientID %>').attr('value', filePath);
                    for (var i = 0; i < fileName.length; i++) {
                        $('#dplFileName').append("<option value='" + fileName[i] + "'>" + fileName[i] + "</option>");
                    }
                }
            }
            $(document).ready(function() {
                $('#dplFileName').html('');
                var Files = $('#<%=hfFileList.ClientID %>').attr('value');
                if (Files != null & Files != '') {
                    var aryFile = Files.split(',');
                    for (var i = 0; i < aryFile.length; i++) {
                        $('#dplFileName').append("<option value='" + aryFile[i] + "'>" + aryFile[i] + "</option>");
                    }
                }
            });
        </script>
        <asp:HiddenField ID="hfFileList" runat="server" />
    	    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
    	    <tr>
                    <td align="right" width="20%">标题：</td>
                    <td width="30%">
                        <asp:TextBox ID="txtTitle" runat="server"  Width="96%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>
	    	<tr>
                    <td align="right" width="20%">分类：</td>
                    <td width="30%"><asp:DropDownList ID="dplHouseClass" runat="server"></asp:DropDownList></td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	<tr>
                    <td align="right" width="20%">面积：</td>
                    <td width="30%">
                        <asp:TextBox ID="txtArea" runat="server"  Width="50%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">小数位最多2位</font></td>
                </tr>
                <tr>
                    <td align="right" width="20%">朝向：</td>
                    <td width="30%">
                        <asp:DropDownList ID="dplOrientation" runat="server">
                            <asp:ListItem Selected="True">坐北朝南</asp:ListItem>
                            <asp:ListItem>坐南朝北</asp:ListItem>
                            <asp:ListItem>坐西朝东</asp:ListItem>
                            <asp:ListItem>坐东朝西</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td width="50%"><font color="red"></font></td>
                </tr>
                <tr>
                    <td align="right" width="20%">
                        价格：</td>
                    <td width="30%">
                        <asp:TextBox ID="txtPrices" runat="server" Width="50%"></asp:TextBox>
                        元</td>
                    <td width="50%">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" width="20%">
                        置顶：</td>
                    <td width="30%">
                        <asp:CheckBox ID="cbIsTop" runat="server" Text="是" />
                    </td>
                    <td width="50%">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" width="20%">
                        类型：</td>
                    <td width="30%">
                        <asp:RadioButtonList ID="rblHouseType" runat="server" 
                            RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">出租</asp:ListItem>
                            <asp:ListItem>出售</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td width="50%">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" width="20%">位置：</td>
                    <td width="80%" colspan="2">
                        <asp:TextBox ID="txtHousePosition" runat="server"  Width="96%" Height="45px" 
                            TextMode="MultiLine" MaxLength="100" ></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">交通指示：</td>
                    <td colspan="2">
                        <asp:TextBox ID="txtTrafficSigns" runat="server"  Width="96%" 
                            TextMode="MultiLine" Height="45px" MaxLength="200" ></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">图片：</td>
                    <td width="30%">
                         <select id="dplFileName" multiple="multiple" size="5" style="width:96%">
                        </select>
                    </td>
                    <td width="50%"><input id="UploadPath" type="hidden" value='/Sites/Site<%=BaseFunction.PublicMethod.GetApplication("SiteID") %>/Upload/' />
                        <span onclick="txtBoxClick();" style="cursor:pointer">选择文件</span></td>
                </tr>
                <tr>
                    <td align="right" width="20%" style="vertical-align:top; line-height:25px;">简介：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtNote" runat="server"  Width="96%"  TextMode="MultiLine" Height="100px" MaxLength="800" ></asp:TextBox>
                    </td>
                </tr>                                                                                             	            
	    </table>   
<div style=" text-align:center"><asp:ImageButton ID="imgSave" runat="server" ImageUrl="~/App_Themes/ManagerTheme/Images/tj.jpg" style="height: 22px" ToolTip="添加" /></div>     
        </asp:View>
        <asp:View ID="View_List" runat="server">
    	    <div style="text-align: right;" class="edittd">
        	<asp:CheckBox ID="cbSelectAll" runat="server" AutoPostBack="True" Text="全部" />&nbsp;
        	<asp:LinkButton ID="lnkBtnDel" runat="server"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px"/>&nbsp;删除选中</asp:LinkButton>&nbsp;&nbsp;
        	<a href="HouseInfo.aspx?Action=Add"><img src="/App_Themes/ManagerTheme/Images/add.gif" style=" border:0px" />&nbsp;添加</a>
    	    </div>       
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
			<tr>
			    <td width="5%" align="center" class="left_bt2">选择</td>
			    <td width="25%" align="left" class="left_bt2">标题</td>
			    <td width="15%" align="center" class="left_bt2">面积</td>
			    <td width="30%" align="left" class="left_bt2">位置</td>
			    <td width="15%" align="left" class="left_bt2">朝向</td>
			    <td align="center" width="10%" class="left_bt2">操作</td>
			</tr>
	        </HeaderTemplate>
                <ItemTemplate>
                    <tr class="menuout"   onMouseOver="this.className='menuin'" onMouseOut="this.className='menuout'">
			<td width="5%" align="center"><asp:CheckBox ID="CheckOn" runat="server" ToolTip='<%#Eval("ID")%>' /></td>
			<td width="25%" align="left"><%#Eval("Title")%></td>
			<td width="15%" align="center"><%#Eval("Area")%></td>
			<td width="30%" align="left"><%#Eval("HousePosition")%></td>
			<td width="15%" align="left"><%#Eval("Orientation")%></td>
			<td width="10%" align="center"><a href="HouseInfo.aspx?Action=Edit&ID=<%#Eval("ID") %>">
				<img src="/App_Themes/ManagerTheme/Images/Edit.gif" style=" border:0px" />&nbsp;编辑</a>&nbsp;&nbsp;&nbsp;<a href="HouseInfo.aspx?Action=Del&ID=<%#Eval("ID") %>">
				<img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px" />&nbsp;删除</a></td>
			        </tr>
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
            </asp:Repeater>
            <div style="text-align:center"> <cc1:iPaging ID="ListPaging" runat="server" /></div>        
        </asp:View>        
    </asp:MultiView>
</asp:Content>

