Hello,
I would to understand , how i can save in my database a new task on a Event
When i use OnTaskInsert
How it's work , there are no documentation ?
How this event it's Fire ?
thanks Olivier
protected void RadGantt1_TaskInsert(object sender, Telerik.Web.UI.Gantt.GanttEventArgs e)
{
foreach (var item in e.Tasks)
{
item.Title = "Nouvelle tache "+DateTime.Now.ToString();
item.ParentID = null;
item.OrderID = 10;
item.Start = DateTime.Now;
item.End = DateTime.Now.AddDays(1);
item.PercentComplete = Convert.ToDecimal("0,2");
item.Expanded = false;
item.Summary = false;
//Response.Write(item.Start);
/*try{
this.oGanttTacheBo.Add();
this.oGanttTacheBo.gat_parent_id = Convert.ToInt32(item.ParentID);
this.oGanttTacheBo.gat_order_id = Convert.ToInt32(item.OrderID);
this.oGanttTacheBo.gat_title = item.Title;
this.oGanttTacheBo.gat_start = item.Start;
this.oGanttTacheBo.gat_end = item.End;
this.oGanttTacheBo.gat_avancement = item.PercentComplete;
this.oGanttTacheBo.gat_expanded = item.Expanded;
this.oGanttTacheBo.gat_summary = item.Summary;
this.oGanttTacheBo.Save();
}catch (Exception ex) {
//Response.Write(ex.Message);
BusinessLayer.TransactionRollback("");
}*/
//Response.Write("tache ajoutée");
}
}
I would to understand , how i can save in my database a new task on a Event
When i use OnTaskInsert
How it's work , there are no documentation ?
How this event it's Fire ?
thanks Olivier
protected
void
RadGantt1_TaskInsert(
object
sender, Telerik.Web.UI.Gantt.GanttEventArgs e)
{
foreach
(var item
in
e.Tasks)
{
this
.oGanttTacheBo.title = item.Title;
this
.oGanttTacheBo.parentid = item.ParentID;
this
.oGanttTacheBo.OrderID = item.OrderID;
this
.oGanttTacheBo.start = item.Start;
this
.oGanttTacheBo.end = item.End;
this
.oGanttTacheBo.PercentComplete = item.PercentComplete;
this
.oGanttTacheBo.Expanded = item.Expanded;
// Here i can save in my database or i make a sql script ?
// How this event it's FIRE ?
this
.oGanttTacheBo.Save();
}
}
protected void RadGantt1_TaskInsert(object sender, Telerik.Web.UI.Gantt.GanttEventArgs e)
{
foreach (var item in e.Tasks)
{
item.Title = "Nouvelle tache "+DateTime.Now.ToString();
item.ParentID = null;
item.OrderID = 10;
item.Start = DateTime.Now;
item.End = DateTime.Now.AddDays(1);
item.PercentComplete = Convert.ToDecimal("0,2");
item.Expanded = false;
item.Summary = false;
//Response.Write(item.Start);
/*try{
this.oGanttTacheBo.Add();
this.oGanttTacheBo.gat_parent_id = Convert.ToInt32(item.ParentID);
this.oGanttTacheBo.gat_order_id = Convert.ToInt32(item.OrderID);
this.oGanttTacheBo.gat_title = item.Title;
this.oGanttTacheBo.gat_start = item.Start;
this.oGanttTacheBo.gat_end = item.End;
this.oGanttTacheBo.gat_avancement = item.PercentComplete;
this.oGanttTacheBo.gat_expanded = item.Expanded;
this.oGanttTacheBo.gat_summary = item.Summary;
this.oGanttTacheBo.Save();
}catch (Exception ex) {
//Response.Write(ex.Message);
BusinessLayer.TransactionRollback("");
}*/
//Response.Write("tache ajoutée");
}
}