<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="driver_addedit.aspx.cs" Inherits="Car.Car.driver_addedit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  
     <meta name="author" content="http://www.dotnetcms.org" />
    <meta name="keywords" content="启明星公务用车申请系统" />

    <script src="../javascript/jquery-1.9.1.min.js"></script>
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <script src="../bootstrap/js/bootstrap.min.js"></script>

    <script src="../javascript/datepick/moment.min.js"></script>
    <link href="../javascript/datepick/daterangepicker.css" rel="stylesheet" />
    <script src="../javascript/datepick/daterangepicker.js"></script>


    <script src="../javascript/layer/layer.js"></script>
    <script src="../javascript/laydate/laydate.js"></script>
    
    <script src="../javascript/car.js"></script>
    <script src="../javascript/common.js" type="text/javascript"></script>
    <link href="../style/btn.css" rel="stylesheet" />
    <script src="../javascript/jquery.cookie.js"></script>
    <link href="../style/car.css" rel="stylesheet" />  
    <link href="../style/patch.css" rel="stylesheet" />

    <style>
        .form-control {
         width:350px; border-radius:0px;
        }
    </style>

</head>
<body style="margin:20px">
    <form id="form1" runat="server">
    <div>


        
        <table class="table">
          <tr>
              <th width="100px">司机姓名</th>
           <td>
         
                  <asp:DropDownList runat="server"   CssClass="form-control inline" ID="ddl_drivername">
                      </asp:DropDownList>
           
            </td>
           

        <th width="100px">准驾车型</th>
        <td>
            <asp:DropDownList runat="server"   CssClass="form-control inline" ID="ddl_drivercartype">
                <asp:ListItem Text="A1"></asp:ListItem>
                  <asp:ListItem Text="A2"></asp:ListItem>
                  <asp:ListItem Text="B1"></asp:ListItem>
                  <asp:ListItem Text="B2"></asp:ListItem>
                  <asp:ListItem Text="C1"></asp:ListItem>
                  <asp:ListItem Text="C2"></asp:ListItem>
                  <asp:ListItem Text="C3"></asp:ListItem>
            </asp:DropDownList>
        
         </td>
       </tr>

       <tr>             
          <th>出生日期</th>
            <td>
 <asp:TextBox ID="txt_birthday" onclick="laydate();"   CssClass="form-control inline"   runat="server"></asp:TextBox>
       </td> 

              <th>初次领证日期</th>

                  
                  <td>
  <asp:TextBox ID="txt_firstdriver"  onclick="laydate();"   CssClass="form-control inline"   runat="server"></asp:TextBox>
  </td>
           </tr>


            <tr>

 <th>驾照有效期从</th>
  <td> 
     <asp:TextBox ID="txt_from1"  onclick="laydate();"   CssClass="form-control inline"   runat="server"></asp:TextBox>
     </td>

                 <th>到</th>

                
  <td>
  <asp:TextBox ID="txt_to1"  onclick="laydate();"   CssClass="form-control inline"   runat="server"></asp:TextBox>
       </td>
            </tr>

            
              
              
             
               
                  
        
 
          <tr>
             <th>
                  备注
             </th>
              <td  colspan="3" >
                 
                <asp:TextBox runat="server" ID="txt_note"  Width="80%" 
                     TextMode="MultiLine" Height="80px"
                     CssClass="form-control" style="display:inline-block"></asp:TextBox>

              </td>
 
          </tr>


            <tr>
                <td align="center" colspan="4">

 <asp:Button ID="btnAdd" CssClass="btn btn-primary btn-sm btn-flat"  ValidationGroup="adds" runat="server" Text="添加车辆" OnClick="btnAdd_Click" />
            
                    
                    
                     <asp:Button ID="btn_edit" CssClass="btn btn-primary btn-sm btn-flat"  ValidationGroup="adds" runat="server" Text="更新" OnClick="btnAdd_Click" />
                  
                       <asp:Button ID="btn_del" CssClass="btn btn-danger btn-sm btn-flat"  
                          CausesValidation="false" OnClientClick="return confirm('确认移除吗？');"
                           runat="server" Text="移除" OnClick="btn_del_click" />
                    
                    
                    
                        </td>

            </tr>
      </table>








<br /><br />
       <asp:PlaceHolder runat="server" ID="ph_addkf">
  <b>违章记录</b> 
          <a href="###" onclick="showmore(this)" data-div="more_addwz" style="float:right;">新增<span class="caret"></span> </a>
</asp:PlaceHolder>
        <div style="margin:2px;"></div>
        <div id="more_addwz" style="margin:5px">

      
        
               违章日期 <asp:TextBox runat="server" onclick="laydate();" class="form-control" style="display:inline-block; width:120px;" ID="txt_kfdate"></asp:TextBox>  
                
              扣分与罚款
            <asp:TextBox runat="server" ID="txt_kf" class="form-control" style="display:inline-block;" ></asp:TextBox>
            
            
             
           
             <asp:Button runat="server" ID="btn_addkf"   class="btn btn-primary " Text="添加" OnClick="btn_addkf_Click"/>

            


   </div>










             <asp:Repeater runat="server" ID="rpt_kf" EnableViewState="false">
                    <HeaderTemplate>
                        
        <div class="ys0">

                    <table width="100%" class="table" border="0" cellspacing="0" cellpadding="0" align="center" style="border-collapse:collapse;" >
                <tr>
                    <th width="150px">扣分日期</th>
                        <th width="80px">扣分与罚款</th>
                
                     <th width="90px">建立者</th>
                     <th width="60px">删</th>
                </tr>

                    </HeaderTemplate>

                    <ItemTemplate>


                          <tr>
         
                     <td  ><%# CarHelper.FormatDt(Eval("kfdate")) %></td>
                    <td><%#Eval("kf") %></td>
                     <td><%#Eval("username") %></td>
                     <td  >
                          

                         <a href="###" data-id='<%#Eval("id") %>' data-type="nj" class="remove">删</a>

                     </td>

                </tr>

                    </ItemTemplate>
               
                    <FooterTemplate>
                          </table>
                        </div>
                    </FooterTemplate>
                    
                     </asp:Repeater>

              
    























        <script>

            function showmore(o) {

                var _div = $(o).data("div");
                $("#" + _div).toggle();

                var key = $("#" + _div).css("display");
                Cookies.set("display" + _div, key, { expires: 30 });
            }


            if (Cookies.get("displaymore_addwz") == undefined || Cookies.get("displaymore_addwz") == "none") {
                $("#more_addwz").hide();
            }
            else {
                $("#more_addwz").show();
            }











            $(document).ready(

               function () {
                   $(".remove").click(

                       function () {
                           var isdel = confirm("确定删除吗");
                           if (isdel) {
                               var _id = $(this).data("id");
                               var _type = $(this).data("type");
                               $.get("ajax/car_kf.aspx?id=" + _id );
                               $(this).parent().parent().remove();
                           }

                       }




                       );


               }



               );

        </script>
       
    
    </div>
    </form>
</body>
</html>
