|
Imports System
Imports System.Collections
Imports System.Data
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports DayPilot.Utils
Imports DayPilot.Web.Ui.Enums
Imports Util
Partial Public Class Project_New
Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
Dim start As Date = Convert.ToDateTime(Request.QueryString("start"))
TextBoxStart.Text = start.ToShortDateString()
End If
End Sub
Protected Sub ButtonOK_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim start As Date = Convert.ToDateTime(TextBoxStart.Text)
Dim duration As Integer = Convert.ToInt32(DropDownListDuration.SelectedValue)
Dim note As String = TextBoxNote.Text
CType(New DataManager(), DataManager).CreateAssignment(start, duration, note)
' passed to the modal dialog close handler, see Scripts/DayPilot/event_handling.js
Dim ht As New Hashtable()
ht("refresh") = "yes"
ht("message") = "Event created."
Modal.Close(Me, ht)
End Sub
Protected Sub ButtonCancel_Click(ByVal sender As Object, ByVal e As EventArgs)
Modal.Close(Me)
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.