<%@ Page Title="" Language="C#" MasterPageFile="book.Master" AutoEventWireup="true" CodeBehind="Calendar_My.aspx.cs" Inherits="Book.Book.Calendar_My" %>
 
<asp:Content ID="Content2" ContentPlaceHolderID="cont_form" runat="server">
      
    <script src="Js/modal.js"></script> 
    <link href="Style/themes.css" rel="stylesheet" />
  
     <style>
         .xx div div div    table   td{ border:solid 1px #DEDFDE !important }
     </style>
    
<script type="text/javascript">

    function createEvent(start, end, thetype) {

        var modal = new DayPilot.Modal();

        modal.top = 120;
        modal.width = 600;
        modal.height = 350;
        modal.opacity = 0;
        modal.border = "2px solid #aaaaaa";

        modal.closed = function () {
            if (this.result == "OK") {
                dpc1.commandCallBack('refresh');
            }
            dpc1.clearSelection();
        };

        modal.showUrl("New.aspx?start=" + start.toStringSortable() + "&end=" + end.toStringSortable() + "&eventtype=" + thetype);
    }



</script>


  


 <div style="text-align:right;margin:10px;">
      
 </div>
	  
       
         <style>
             div.navigator_silver_day {
              text-align:center !important;
             }
         </style>

     

    <table style="width:100%">
        <tr>
            <td valign="top" style=" width:200px; " >

 



                <div style="border:solid 1px #f2f2f2; padding:2px; margin:2px;">
                <DayPilot:DayPilotNavigator 
                    ID="DayPilotNavigator1" 
                    CellWidth="33"
                    CellHeight="38"  
                    runat="server" 
                    BoundDayPilotClientObjectName="dpc1" 
                    SelectMode="Day"
                    ShowMonths="1"
                    CssClassPrefix="navigator_silver_"
                    DataStartField="starttime"
                    DataEndField="endtime"  
                    DayHeaderHeight="30"
                    TitleHeight="30" 
                    WeekStarts="Sunday"
                    ></DayPilot:DayPilotNavigator>
             </div>

            
                    
            </td>
            <td valign="top" style=" padding:10px; padding-top:0px;" class="xx">
             
                
                <daypilot:daypilotcalendar 
                    ContextMenuSelectionID="DayPilotMenuSelection"
                  

                    TimeFormat="Auto" 
                    CellHeight="35"
                 
                    id="DayPilotCalendar1" 
                    runat="server" 
                    datastartfield="starttime" 
                    dataendfield="endtime" 
                    datatextfield="name" 
                    datavaluefield="id" 
                    datatagfields="others2"
                    Days="3" 
                    ClientObjectName="dpc1" 

                    BusinessBeginsHour="0"
                    BusinessEndsHour="24"
                    HeightSpec="Fixed"
                    ScrollPositionHour="8" 
                    height="700"

                    OnCommand="DayPilotCalendar1_Command" 
                    OnBeforeEventRender="DayPilotCalendar1_BeforeEventRender" 

                     
                    EventDeleteHandling="Disabled"
                  
                                   
                  
                    TimeRangeSelectedHandling="Hold" 
                    TimeRangeDoubleClickHandling="JavaScript"        
                    TimeRangeDoubleClickJavaScript ="createEvent(start, end,'event');"


                   EventClickHandling="JavaScript"
                    EventClickJavaScript="window.open('details.aspx?id='+e.value());" 
                    
                     

                 
                  
                    EventDoubleClickHandling="Disabled" 
          




                    EventHoverHandling="Bubble" 
                    EventSelectColor="Blue"
                    EventCorners="Regular"
                    BackColor="white" 
                    EventBackColor="#638EDE"
                    EventBorderColor="#2951A5"
                    HourNameBackColor="#F3F3F9"
                    HourFontColor="#42658C"
                    HeaderFontColor="#42658C"
                    EventFontColor="white"
                    EventFontFamily="Tahoma,Verdana,Sans-serif"
                    BorderColor="#CED2CE"
                    CellBorderColor="#DEDFDE"
                    AllDayEventBackColor="#2951a5"
                    AllDayEventFontColor="#ffffff"
                    AllDayEventBorderColor="transparent"
                    HourBorderColor="#DEDFDE"
                    HourHalfBorderColor="#EBEDEB"
                    HourNameBorderColor="#DEDFDE" DayEndsHour="0" 
                   
                    ShowAllDayEvents="True" 
                    ShowAllDayEventStartEnd="False" 
                  


                  
                   
                     
                    ></daypilot:daypilotcalendar>
                    
                    
                    <br />
            </td>
        </tr>
    </table>

      


 
    
    
    <DayPilot:DayPilotMenu ID="DayPilotMenuSelection" runat="server" CssClassPrefix="menu_">
         <DayPilot:MenuItem Action="JavaScript"     JavaScript="createEvent(e.start, e.end,'event');"    Text="新事件" />
         <DayPilot:MenuItem Action="JavaScript"     JavaScript="createEvent(e.start, e.end,'meeting');"    Text="会议邀请" />
         <DayPilot:MenuItem Action="JavaScript" JavaScript="dpc1.clearSelection();"   Text="取消选择" />

    </DayPilot:DayPilotMenu>






  
</asp:Content>
