or
<div
class
=
"row"
>
@(Html.Kendo().Gantt<Gantt.Models.TaskViewModel, Gantt.Models.DependencyViewModel>()
.Name(
"gantt"
)
.Columns(columns =>
{
//columns.Bound(c => c.TaskID).Title("ID").Width(50);
columns.Bound(
"title"
).Editable(
false
).Sortable(
true
);
columns.Bound(
"start"
).Title(
"Start Time"
).Format(
"{0:MM/dd/yyyy}"
).Width(100).Editable(
false
).Sortable(
true
);
columns.Bound(
"end"
).Title(
"End Time"
).Format(
"{0:MM/dd/yyyy}"
).Width(100).Editable(
false
).Sortable(
true
);
})
.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(
true
));
views.MonthView();
})
.Height(800)
.ShowWorkHours(
false
)
.ShowWorkDays(
false
)
.Snap(
true
)
.Editable(
false
)
.Selectable(
true
)
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.TaskID);
m.ParentId(f => f.ParentID);
m.OrderId(f => f.OrderId);
m.Field(f => f.Expanded).DefaultValue(
true
);
})
.Read(
"ReadTasks"
,
"Home"
)
//.Create("CreateTask", "Gantt")
//.Destroy("DestroyTask", "Gantt")
//.Update("UpdateTask", "Gantt")
)
.DependenciesDataSource(d => d
.Model(m =>
{
m.Id(f => f.DependencyID);
m.PredecessorId(f => f.PredecessorID);
m.SuccessorId(f => f.SuccessorID);
m.Type(f => f.Type);
})
.Read(
"ReadDependencies"
,
"Home"
)
//.Create("CreateDependency", "Gantt")
//.Destroy("DestroyDependency", "Gantt")
//.Update("UpdateDependency", "Gantt")
)
)</div>
<
div
class
=
"form-group"
>
@Html.LabelFor(m => m.OrganizationName, new { @class = "col-md-4 control-label" })
<
div
class
=
"col-md-4"
>
@Html.Kendo().AutoCompleteFor(m => m.OrganizationName)
.MinLength(3).Name("OrganizationName")
.DataSource(s => { s.Read(r => { r.Action("FindVets", "General"); }); })
.DataTextField("Name")
.HtmlAttributes(new { @class = "form-control" })
</
div
>
</
div
>
public JsonResult FindVets(string OrganizationName)
{
var Vets = General.GetRegularVet();
var a = (from v in Vets
where v.Name.ToUpper().Contains(OrganizationName.ToUpper())
select v).ToList();
return Json(a, JsonRequestBehavior.AllowGet);
}