| .radwindow a.windowicon |
| { |
| display: block; |
| margin-right: 3px; |
| width: 20px !important; |
| height: 16px !important; |
| background-image: url(mynewicon.ico) !important; |
| } |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="EndTime" DataKeyField="ID" | |
| DataSourceID="sdsLessons" DataStartField="StartTime" DataSubjectField="Comments" | |
| HoursPanelTimeFormat="htt" Skin="Office2007" ValidationGroup="RadScheduler1" | |
| SelectedDate="2008-11-24" SelectedView="WeekView" Style="top: 0px; left: 0px" | |
| CustomAttributeNames="Subject,Text,StudentID,TextID"> | |
| </telerik:RadScheduler> | |
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Test.WebApplication.test" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using Telerik.Web.UI; |
| namespace Test.WebApplication |
| { |
| public partial class test : System.Web.UI.Page |
| { |
| public static DataTable currencyTable; |
| protected RadComboBox RadCombobox1; |
| protected void Page_Init(object sender, EventArgs e) |
| { |
| RadCombobox1 = new RadComboBox(); |
| RadCombobox1.AllowCustomText = false; |
| RadCombobox1.EnableItemCaching = true; |
| RadCombobox1.AutoPostBack = true; |
| RadCombobox1.IsCaseSensitive = false; |
| RadCombobox1.SortCaseSensitive = false; |
| RadCombobox1.Filter = RadComboBoxFilter.Contains; |
| RadCombobox1.EnableLoadOnDemand = true; |
| RadCombobox1.EnableVirtualScrolling = true; |
| RadCombobox1.ShowMoreResultsBox = true; |
| RadCombobox1.ShowDropDownOnTextboxClick = false; |
| RadCombobox1.ItemsRequested += RadCombobox1_ItemsRequested; |
| PlaceHolder1.Controls.Add(RadCombobox1); |
| } |
| private void RadCombobox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) |
| { |
| } |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| currencyTable = CreateCurrencyTable(); |
| RadCombobox1.DataTextField = "name"; |
| RadCombobox1.DataValueField = "id"; |
| RadCombobox1.DataSource = currencyTable; |
| RadCombobox1.DataBind(); |
| } |
| } |
| protected DataTable CreateCurrencyTable() |
| { |
| var table = new DataTable(); |
| DataRow row; |
| DataColumn column; |
| column = new DataColumn(); |
| column.DataType = System.Type.GetType("System.Int32"); |
| column.ColumnName = "id"; |
| column.ReadOnly = false; |
| column.Unique = true; |
| table.Columns.Add(column); |
| column = new DataColumn(); |
| column.DataType = System.Type.GetType("System.String"); |
| column.ColumnName = "name"; |
| column.ReadOnly = false; |
| column.Unique = false; |
| table.Columns.Add(column); |
| row = table.NewRow(); |
| row["name"] = "RUR"; |
| row["id"] = 1; |
| table.Rows.Add(row); |
| row = table.NewRow(); |
| row["name"] = "USD"; |
| row["id"] = 2; |
| table.Rows.Add(row); |
| row = table.NewRow(); |
| row["name"] = "EURO"; |
| row["id"] = 3; |
| table.Rows.Add(row); |
| return table; |
| } |
| } |
| } |
' get the facade we need
Dim schedulingFacade As ISchedulingFacade = SymoRequestContext.GetServiceLocator.GetService(Of ISchedulingFacade)("SchedulingFacade")
Dim ID As Guid = New Guid(e.Appointment.ID.ToString)
Dim fresult As FacadeResult = New FacadeResult
Try
TransactionManager.Instance.BeginTransaction()
Select Case e.Appointment.Attributes("aptType")
Case "0" 'Unavailability
fresult = schedulingFacade.MoveResourceUnavailability(ID, e.ModifiedAppointment.Start, e.ModifiedAppointment.End)
Case "1" 'Visit
fresult = schedulingFacade.MoveVisit(ID, e.ModifiedAppointment.Start)
Case "2" 'Stop point
fresult = schedulingFacade.MoveResourceStopPoint(ID, e.ModifiedAppointment.Start, e.ModifiedAppointment.End)
End Select
If fresult.IsValidResult Then
TransactionManager.Instance.CommitTransaction()
Else
TransactionManager.Instance.RollbackTransaction()
e.Cancel =
True
'Dim js As New System.Web.Script.Serialization.JavaScriptSerializer()
'Dim JsonErrorMessage As String = js.Serialize(fresult.ErrorMessage)
'Dim AjaxManager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
'ScriptManager.RegisterStartupScript(Me, GetType(BaseController), "showAlerts", "showAlert(" + JsonErrorMessage + ");", True)
End If
UpdateCalendar()
Catch ex As Exception
m_logger.Error(ex.Message)
TransactionManager.Instance.RollbackTransaction()
e.Cancel =
True
End Try