Hello Lyubo...
I still do some mistakes, bud I don't know where... When I have New Appointment frame, nothing happends...
There is my code and pictures...
Please help
Best regards
Tomy
Private Sub Calendar_Main_ItemCreated(sender As Object, e As MindFusion.Scheduling.ItemEventArgs) Handles Calendar_Main.ItemCreated Dim varDatoFrom As Date = Now Dim varDateTo As Date = Now
e.Item.StartTime = New DateTime(Int(Format(e.Item.StartTime, "yyyy")), _ Int(Format(e.Item.StartTime, "MM")), _ Int(Format(e.Item.StartTime, "dd")), _ 14, 0, 0) e.Item.EndTime = New DateTime(Int(Format(e.Item.EndTime, "yyyy")), _ Int(Format(e.Item.EndTime, "MM")), _ Int(Format(e.Item.EndTime, "dd")), _ 12, 0, 0) varDatoFrom = DateValue(e.Item.StartTime) varDateTo = DateValue(e.Item.EndTime) End Sub
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/SiteAccommodation.Master" CodeBehind="TravelCalendar.aspx.vb" Inherits="touristsoftCH.TravelCalendar" %>
<%@ Register Assembly="MindFusion.Scheduling.WebForms" Namespace="MindFusion.Scheduling.WebForms" TagPrefix="MindFusion" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <MindFusion:Calendar ID="Calendar_Main" runat="server" CurrentView="ResourceView" Height="400px" Theme="Silver" GroupType="GroupByLocations" ItemCreatingScript="onItemCreating"> <ListViewSettings NumberOfCells="10"> </ListViewSettings> <TimetableSettings> <Dates> <MindFusion:TimetableDate Value="2012-09-27"></MindFusion:TimetableDate> </Dates> </TimetableSettings> <ResourceViewSettings VisibleCells="28"> <MainHeaderStyle TextAlignment="MiddleCenter" /> </ResourceViewSettings> </MindFusion:Calendar> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <script type="text/javascript"> function onItemCreating(sender, args) { var item = args.get_item(); item.location = item.location || fallbackValue; } </script> </asp:Content>
|