<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Web25_RoomState_KD.aspx.cs" Inherits="Web25175_Hotel2.Web.Manage.Web25_RoomState_KD" %>

<!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 runat="server">
    <title>开房</title>
    <script language="javascript" src="js/Web25175_Hotel2.v1.1.js" type="text/javascript"></script>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
<script src="LodopFuncs.js" type="text/javascript"></script>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
	<embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="install_lodop.exe"></embed>
</object> 
<object classid="clsid:10946843-7507-44FE-ACE8-2B3483D179B7" id="CVR_IDCard" name="CVR_IDCard" width="0" height="0" ></object>
</head>
<body style="position:relative">
    <form id="form1" runat="server">
     <asp:HiddenField ID="HFID" runat="server" />
        <div class="OperateTitle">
            <div>
                开单
            </div>
        </div>
        <table class="OperateTable" style="position:relative; z-index:99">
            <tr class="FFtr">
                <td class="left">账单号：</td>
                <td>
                   <asp:TextBox ID="txtAccountNumber" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorAccountNumber1" runat="server" ControlToValidate="txtAccountNumber" ErrorMessage="请填写：账单号" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">客房号：</td>
                <td>
                   <asp:TextBox ID="txtRoomCode" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorRoomCode1" runat="server" ControlToValidate="txtRoomCode" ErrorMessage="请填写：客房号" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="FFtr">
                <td class="left" style="height: 25px">房间类型：</td>
                <td style="height: 25px">
                   <asp:TextBox ID="txtRoomType" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorRoomType1" runat="server" ControlToValidate="txtRoomType" ErrorMessage="请填写：房间类型" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">预设单价：</td>
                <td>
                   <asp:TextBox ID="txtRoomPrice" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorRoomPrice1" runat="server" ControlToValidate="txtRoomPrice" ErrorMessage="请填写：预设单价" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">预住天数：</td>
                <td>
                   <asp:TextBox ID="txtInDay" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorInDay1" runat="server" ControlToValidate="txtInDay" ErrorMessage="请填写：预住天数" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">押金：</td>
                <td>
                   <asp:TextBox ID="txtDeposit" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorDeposit1" runat="server" ControlToValidate="txtDeposit" ErrorMessage="请填写：押金" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">&nbsp;</td>
                <td>
                    <asp:CheckBox ID="chkIsHour" runat="server" AutoPostBack="True" OnCheckedChanged="chkIsHour_CheckedChanged" /> 是否钟点房
                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">打折比例：</td>
                <td>
                   <asp:TextBox ID="txtDiscountPercentage" runat="server" CssClass="textbox" AutoPostBack="True" OnTextChanged="txtDiscountPercentage_TextChanged"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorDiscountPercentage1" runat="server" ControlToValidate="txtDiscountPercentage" ErrorMessage="请填写：打折比例" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">
                    实际单价：</td>
                <td>
                   <asp:TextBox ID="txtPrice" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorPrice1" runat="server" ControlToValidate="txtPrice" ErrorMessage="请填写：实际单价" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">宾客人数：</td>
                <td>
                   <asp:TextBox ID="txtInNumber" runat="server" CssClass="textbox"></asp:TextBox>
                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorInNumber1" runat="server" ControlToValidate="txtInNumber" ErrorMessage="请填写：宾客人数" Display="None"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">付款方式：</td>
                <td>
                        <asp:DropDownList ID="txtPayType" runat="server" CssClass="dropdownlist">
                            <asp:ListItem Value="现金">现金</asp:ListItem>
                            <asp:ListItem Value="银行卡">银行卡</asp:ListItem>
                            <asp:ListItem Value="其他">其他</asp:ListItem>
                        </asp:DropDownList>

                   <font color=red>*</font>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidatorPayType1" runat="server" ControlToValidate="txtPayType" ErrorMessage="请选择：付款方式" Display="None"></asp:RequiredFieldValidator>


                </td>

            </tr>
            <tr class="F7tr" visible="false" runat="server">
                <td class="left">&nbsp;</td>
                <td>
                    <asp:CheckBox ID="chkIsDayPrompt" runat="server" /> 到预住天数自动提示
                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">&nbsp;</td>
                <td>
                    <asp:CheckBox ID="chkIsSecret" runat="server" /> 保密房
                </td>
            </tr>
            <tr class="F7tr" style="display:none">
                <td class="left">&nbsp;</td>
                <td>
                    <asp:CheckBox ID="chkIsPrint" runat="server" /> 打印开单信息
                </td>
            </tr>
           </table>
        <table class="OperateTable" style="position:absolute; z-index:100; top:37px; left:300px; width:350px">
            <tr class="FFtr">
                <td class="left" style="height: 24px">宾客类型：</td>
                <td style="height: 24px">
                    &nbsp;<asp:DropDownList ID="txtGuestType" runat="server">
                        <asp:ListItem Selected="True">普通宾客</asp:ListItem>
                        <asp:ListItem>VIP会员</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr class="F7tr">
                <td class="left">宾客姓名：</td>
                <td>
                   <asp:TextBox ID="txtGuestName" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">宾客性别：</td>
                <td>
                        <asp:DropDownList ID="txtGuestSex" runat="server" CssClass="dropdownlist">
                            <asp:ListItem Value="男">男</asp:ListItem>
                            <asp:ListItem Value="女">女</asp:ListItem>
                        </asp:DropDownList>

                   
                </td>

            </tr>
            <tr class="F7tr">
                <td class="left">证件类型：</td>
                <td>
                        <asp:DropDownList ID="txtIDCardType" runat="server" CssClass="dropdownlist">
                            <asp:ListItem Value="身份证">身份证</asp:ListItem>
                            <asp:ListItem Value="驾驶证">驾驶证</asp:ListItem>
                            <asp:ListItem Value="学生证">学生证</asp:ListItem>
                            <asp:ListItem Value="军官证">军官证</asp:ListItem>
                            <asp:ListItem Value="护照">护照</asp:ListItem>
                            <asp:ListItem Value="工作证">工作证</asp:ListItem>
                            <asp:ListItem Value="其他">其他</asp:ListItem>
                        </asp:DropDownList>

                   
                </td>

            </tr>
            <tr class="FFtr">
                <td class="left">证件号码：</td>
                <td>
                   <asp:TextBox ID="txtIDCardNo" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">联系电话：</td>
                <td>
                   <asp:TextBox ID="txtTel" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">宾客来源：</td>
                <td>
                   <asp:TextBox ID="txtGuestFrom" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">公司名称：</td>
                <td>
                   <asp:TextBox ID="txtGuestCompany" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">地址信息：</td>
                <td>
                   <asp:TextBox ID="txtAddress" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="F7tr">
                <td class="left">备注信息：</td>
                <td>
                   <asp:TextBox ID="txtRemark" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
            <tr class="FFtr">
                <td class="left">其他：</td>
                <td>
                   <asp:TextBox ID="txtOther" runat="server" CssClass="textbox"></asp:TextBox>
                   
                </td>
            </tr>
        </table>
        <table id="OperateButton" >
            <tr>
                <td class="left">
                    </td>
                <td style="width: auto; text-align: left;">
                    <asp:Button ID="btnInsert" runat="server" OnClick="btnInsert_Click" Text="登记入住" CssClass="btn" />&nbsp;
                    <asp:Button ID="btnClose" runat="server" OnClick="btnClose_Click" Text="关闭" CssClass="btn" ValidationGroup="B" /></td>
            </tr>
        </table>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" />
    </form>
    <input id="RETSTR" type="hidden" />
</body>
</html>
<script type="text/javascript">
    var ti = null;
    var tc = 0;
    function ReadCard_onclick() {
        try {
            var CVR_IDCard = document.getElementById("CVR_IDCard");
            var strReadResult = CVR_IDCard.ReadCard();
            if (strReadResult == "0") {
                document.all['txtGuestName'].value = CVR_IDCard.Name;
                document.all['txtGuestSex'].value = CVR_IDCard.Sex;
                document.all['txtIDCardNo'].value = CVR_IDCard.CardNo;

                if (ti != null) window.clearTimeout(ti);
            } else {
                
                tc += 1;
                if (tc >= 30) {
                    if (ti != null) window.clearTimeout(ti);
                } else {
                    ti = window.setTimeout("ReadCard_onclick()", 2000);
                }
            }
        } catch (e) {
            //
        }
        //if (ti!=null) window.clearTimeout(ti);
        //ti=window.setTimeout("ReadCard_onclick()", 2000);
    }
    ReadCard_onclick();

    window.document.ondblclick = function () {
        //window.parent.uiWindow_Close();
    }
    window.onunload = function () {
        if (ti != null) window.clearTimeout(ti);
        //alert('该窗口已经被关闭！'); 
    } 
</script>
