Hi,
We have downloaded ASP.Net trials/demos from Telerik, TMS and DevXpress and Scheduler.Net. We think yours looks the best, but we have not been able to get it working, even at a very low level with our (MySQL) data. We can see that you ask for pre-sales support to be via your forums, we ask that you please actively assist us past this blocking stage; we will be happy to purchase once we get this far.
We have followed the patterns of code in your demos. We can debug and see the JSON data being returned in Data(). The ‘active’ lines of code we think important is copied below. We just don’t see anything on the scheduler!
If we cannot get support at this point, please let us know, we will reluctantly have to return to a competitor.
Regards,
Matt Jeffrey
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DHTMLX.Scheduler;
using DHTMLX.Common;
using DHTMLX.Scheduler.Data;
using TeleceteraConnectSvhContext;
namespace SchedulerNetTest
{
public class HomeController : Controller
{
public ActionResult Index()
{
//Being initialized in that way, scheduler will use CalendarController.Data as a the datasource and CalendarController.Save to process changes
var scheduler = new DHXScheduler(this);
scheduler.Skin = DHXScheduler.Skins.Terrace;
scheduler.InitialDate = DateTime.Now;
//scheduler.EnableDynamicLoading(SchedulerDataLoader.DynamicalLoadingMode.Month);
scheduler.Config.multi_day = true;//render multiday events
scheduler.Data.DataProcessor.UpdateFieldsAfterSave = true;
scheduler.LoadData = true;
scheduler.EnableDataprocessor = true;
return View(scheduler);
}
public ContentResult Data()
{
TeleceteraConnectSvhDataContext cutData = new TeleceteraConnectSvhDataContext();
IEnumerable<Job> cutJobs = cutData.Jobs;
cutJobs = cutJobs.Where(c => c.Assignedto == "awakeham" && c.Scheduleddt != null && c.Scheduleddt > DateTime.Now.AddDays(-1) && c.Scheduleddt < DateTime.Now.AddDays(1));
var data = new SchedulerAjaxData((cutJobs));
return Content(data.Render(eventRenderer));
}
public void eventRenderer(System.Text.StringBuilder builder, object ev)
{
var item = ev as Job;
DateTime endtime = Convert.ToDateTime(item.Scheduleddt).AddMinutes(Convert.ToInt16(item.Duration));
builder.Append(
string.Format("{{id:{0}, text:\"{1}\", start_date:\"{2:MM/dd/yyyy HH:mm}\", end_date:\"{3:MM/dd/yyyy HH:mm}\"}}",
item.Recid,
item.Description,
item.Scheduleddt,
endtime));
}
public ContentResult Save(int? id, FormCollection actionValues)
{
var action = new DataAction(actionValues);
var changedEvent = (Job)DHXEventsHelper.Bind(typeof(Job), actionValues);
TeleceteraConnectSvhDataContext data = new TeleceteraConnectSvhDataContext();
try
{
switch (action.Type)
{
case DataActionTypes.Insert: // define here your Insert logic
data.Jobs.InsertOnSubmit(changedEvent);
break;
case DataActionTypes.Delete: // define here your Delete logic
changedEvent = data.Jobs.SingleOrDefault(ev => ev.Recid == action.SourceId);
data.Jobs.DeleteOnSubmit(changedEvent);
break;
default:// "update" // define here your Update logic
var eventToUpdate = data.Jobs.SingleOrDefault(ev => ev.Recid == action.SourceId);
DHXEventsHelper.Update(eventToUpdate, changedEvent, new List<string>() { "recid" });//update all properties, except for id
break;
}
data.SubmitChanges();
action.TargetId = changedEvent.Recid;
}
catch(Exception e)
{
action.Type = DataActionTypes.Error;
}
return (ContentResult)new AjaxSaveResponse(action);
}
}
}