<%@ Page Title="SHIOL :: EVENTOS" Language="vb" AutoEventWireup="false" MasterPageFile="~/SIG/Site.Master" 
CodeBehind="BAfrmCalendarSeguimientos.aspx.vb" Inherits="SGHweb.BAfrmCalendarSeguimientos" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
        <script type ="text/javascript">
            function openForm(idenviada) 
            {
                var oWnd = radopen("Frm_PopUpCalendarBySeg.aspx?Idsegui=" + idenviada + "&variableX=999", "NuevoReque");
            }

            function CerrarVentana()
            {
                $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("CierraVentanaRebind");
            }

            function clientLoadHandler(sender) {
                var combo = sender;
                var items = combo.get_items();
                var itemCount = items.get_count()
                for (var counter = 0; counter < itemCount; counter++) {
                    var item = items.getItem(counter);
                    item.set_checked(true)
                }
            }
        </script>   
    </telerik:RadScriptBlock>
    <style type="text/css">
            .divResponsables {
	            border:1px solid #8db2e3;
	            margin:0.7em;
	            padding:0.2em;
	            font-size:1em;
	            overflow:hidden;
	            width:95%;
	            text-align:center;
            }
            .divtableInterior {
	            border:1px solid #8db2e3;
	            font-size:1em;
	            overflow:hidden;
	            width:100%;
	            text-align:center;
            }
            .divtableInterior1 {
	            border:1px solid #8db2e3;
	            font-size:1em;
	            overflow:hidden;
	            width:100%;
	            height:25px;
	            text-align:center;
            }
    .button_example{
        border:1px solid #25729a; 
        -webkit-border-radius: 3px; 
        -moz-border-radius: 3px;
        border-radius: 3px;
        font-size:12px;
        font-family:arial, helvetica, sans-serif; 
        padding: 1px 1px 1px 1px; 
        text-decoration:none; 
        display:inline-block;
        text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
        font-weight:bold; 
        color: #FFFFFF;
        background-color: #3093c7; 
        background-image: linear-gradient(to bottom, #3093c7, #1c5a85);
     }

    .button_example:hover{
     border:1px solid #1c5675;
     background-color: #26759e; 
     background-image: linear-gradient(to bottom, #26759e, #133d5b);
     }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<center>
    <table border="0" width="90%">
        <tr>
            <td style="font-weight: bold; text-align:center" colspan="2">
                <dt class="divtableInterior">
                    <table width="100%" border="0px">
                        <tr>
                           <td style="font-weight: bold; text-align:right; width:15%">
                                Asignado a:&nbsp;
                            </td>
                            <td style="font-weight: bold; text-align:left; width:25%">
                                <telerik:RadComboBox ID="RadComboBox2" Runat="server" 
                                    Culture="es-ES" DataSourceID="SDS_Salas" DataTextField="nombre" 
                                    DataValueField="productoid" style="margin-bottom: 0" Width="90%" 
                                    CheckBoxes="True" EnableCheckAllItemsCheckBox="True" 
                                    OnClientLoad="clientLoadHandler" AutoPostBack="True" 
                                    LoadingMessage="Cargando..." Skin="Vista">
                                    <Localization AllItemsCheckedString="Todos los Elementos Seleccionados" 
                                        CheckAllString="Seleccionar Todos" ItemsCheckedString="Elementos Seleccionados" 
                                        NoMatches="No hay Coincidencias" />
                                </telerik:RadComboBox>
                            </td>             
                            <td style=" text-align:right; width:15%">
                                Responsable :  
                            </td>
                            <td style=" text-align:left; width:25%">
                                <asp:DropDownList ID="responsableCB" runat="server" Width="90%"
                                    DataSourceID="SDS_responsable" DataTextField="NombreUsuario" 
                                    DataValueField="UsuarioID">
                                </asp:DropDownList>
                            </td>
                            <td style=" text-align:left; width:5%">
                            </td>
                            <td style=" text-align:center; width:15%">
                                <asp:Button ID="buscaB" runat="server" class="button_example" Text="BUSCAR" Width="90%" Height="30px"/>           
                            </td>
                        </tr>
                    </table>
                </dt>
            </td>
        </tr>
        <tr>
            <td style=" width:85%" colspan="6">
                <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="700px" Skin="Windows7" ShowAllDay="true"
                    SelectedView="MonthView" 
                    DayStartTime="00:00:00" DayEndTime="23:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
                    EnableDescriptionField="True" AppointmentStyleMode="Default"
                    DataSourceID="SqlDataSource1" Width ="100%"
                    DataKeyField="reservaid" DataSubjectField="anombre1" 
                    DataStartField="HoraInicioEvento1" DataEndField="HoraFinalEvento1" 
                    DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" 
                    OverflowBehavior="Auto" Culture="es-ES" 
                    StartEditingInAdvancedForm="False" ShowViewTabs="True" ShowFooter="True" 
                    DataDescriptionField="dia" NumberOfHoveredRows="2" RowHeight="30px" 
                    Font-Size="7pt" DataModelID="idpendiente" >
                    <AdvancedForm Modal="true"></AdvancedForm>
                    <TimeSlotContextMenuSettings EnableDefault="False"></TimeSlotContextMenuSettings>
                    <DayView DayEndTime="23:00:00" DayStartTime="00:00:00" 
                        WorkDayEndTime="23:00:00" WorkDayStartTime="07:00:00" />
                    <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
                    <ResourceTypes>
                        <telerik:ResourceType DataSourceID="SDS_Salas" KeyField="productoid" 
                            Name="Resource" TextField="nombre" ForeignKeyField="productoid"/>
                    </ResourceTypes>
                    <ResourceStyles>
                        <telerik:ResourceStyleMapping Type="Resource" Text="Area" ApplyCssClass="rsCategoryGreen">
                        </telerik:ResourceStyleMapping>
                        <telerik:ResourceStyleMapping Type="Resource" Text="Empresa" ApplyCssClass="rsCategoryDarkBlue">
                        </telerik:ResourceStyleMapping>
                        <telerik:ResourceStyleMapping Type="Resource" Text="Habitacion" ApplyCssClass="rsCategoryViolet">
                        </telerik:ResourceStyleMapping>
                        <telerik:ResourceStyleMapping Type="Resource" Text="Trabajador" ApplyCssClass="rsCategoryRed">
                        </telerik:ResourceStyleMapping>
                    </ResourceStyles>
                    
                </telerik:RadScheduler>
            </td>
        </tr>
    </table>
</center>
    
    <asp:HiddenField runat="server" ID="HiddenField1" />
    <asp:SqlDataSource ID="SDS_Salas" runat="server" 
        SelectCommand="sghP_estadosSeguimientosCalendar" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        SelectCommand="sghP_SeguimientoCalendar" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="01/01/2000" Name="Desde" 
                SessionField="fechaV" Type="DateTime" />
            <asp:SessionParameter DefaultValue="01/01/2000" Name="Hasta" 
                SessionField="fechaLimiteV" Type="DateTime" />
            <asp:ControlParameter ControlID="responsableCB" DefaultValue="0" 
                Name="responsable" PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
        <asp:SqlDataSource ID="SDS_responsable" runat="server" 
        SelectCommand="sghP_listaUsuarios" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="buscaB">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Overlay="True" Skin="WebBlue">
            <Windows>
                <telerik:RadWindow ID="NuevoReque" runat="server" Animation="Fade" Behavior="Move"
                    Behaviors="Move" Height="580px" InitialBehavior=" Move" InitialBehaviors="Move"
                    Left="" Modal="True" NavigateUrl="" ReloadOnShow="True" OnClientClose="CerrarVentana" 
                    Skin="WebBlue" Style="display: none;" Top="" VisibleStatusbar="false" Width="900px" 
                    Title="Observaciones Por Area" >
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
</asp:Content>
