Fix colorazione eventi

This commit is contained in:
Samuele E. Locatelli
2015-04-29 17:40:26 +02:00
parent 9fc67e86e5
commit cd10347775
15 changed files with 51 additions and 4 deletions
BIN
View File
Binary file not shown.
+3 -2
View File
@@ -35,7 +35,6 @@
DataStartField="Inizio"
DataEndField="Fine"
TimeFormat="Clock24Hours"
CssClassPrefix="calendar_white"
ViewType="Day"
HeightSpec="BusinessHours"
BusinessBeginsHour="8"
@@ -47,7 +46,9 @@
EventMoveHandling="CallBack"
EventClickHandling="JavaScript"
EventClickJavaScript="eventClick(e)"
EventResizeHandling="Disabled">
EventResizeHandling="Disabled"
Theme="calendar_white" OnBeforeEventRender="DayPilotCalendar1_BeforeEventRender"
>
</DayPilot:DayPilotCalendar>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByDate" TypeName="WebSCR_data.DS_ApplicazioneTableAdapters.v_ImpegniCalTableAdapter">
<SelectParameters>
@@ -138,5 +138,15 @@ namespace WebSCR.WebUserControls
// resetto sel rbl
rblSquadre.SelectedIndex = -1;
}
/// <summary>
/// intercetto e cambio classe CSS...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void DayPilotCalendar1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.Calendar.BeforeEventRenderEventArgs e)
{
// this assumes your event object in Events collection has "color" field or property
e.BackgroundColor = (string)e.DataItem["CssColor"];
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+30 -2
View File
@@ -3322,6 +3322,8 @@ namespace WebSCR_data {
private global::System.Data.DataColumn columnCodSquadra;
private global::System.Data.DataColumn columnCssColor;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public v_ImpegniCalDataTable() {
@@ -3395,6 +3397,14 @@ namespace WebSCR_data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn CssColorColumn {
get {
return this.columnCssColor;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Browsable(false)]
@@ -3432,14 +3442,15 @@ namespace WebSCR_data {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public v_ImpegniCalRow Addv_ImpegniCalRow(string NomeImpegno, System.DateTime Inizio, System.DateTime Fine, string CodSquadra) {
public v_ImpegniCalRow Addv_ImpegniCalRow(string NomeImpegno, System.DateTime Inizio, System.DateTime Fine, string CodSquadra, string CssColor) {
v_ImpegniCalRow rowv_ImpegniCalRow = ((v_ImpegniCalRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
null,
NomeImpegno,
Inizio,
Fine,
CodSquadra};
CodSquadra,
CssColor};
rowv_ImpegniCalRow.ItemArray = columnValuesArray;
this.Rows.Add(rowv_ImpegniCalRow);
return rowv_ImpegniCalRow;
@@ -3474,6 +3485,7 @@ namespace WebSCR_data {
this.columnInizio = base.Columns["Inizio"];
this.columnFine = base.Columns["Fine"];
this.columnCodSquadra = base.Columns["CodSquadra"];
this.columnCssColor = base.Columns["CssColor"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -3489,6 +3501,8 @@ namespace WebSCR_data {
base.Columns.Add(this.columnFine);
this.columnCodSquadra = new global::System.Data.DataColumn("CodSquadra", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnCodSquadra);
this.columnCssColor = new global::System.Data.DataColumn("CssColor", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnCssColor);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnIdxImpegno}, true));
this.columnIdxImpegno.AutoIncrement = true;
@@ -3503,6 +3517,8 @@ namespace WebSCR_data {
this.columnFine.ReadOnly = true;
this.columnCodSquadra.AllowDBNull = false;
this.columnCodSquadra.MaxLength = 50;
this.columnCssColor.AllowDBNull = false;
this.columnCssColor.MaxLength = 50;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -5298,6 +5314,17 @@ namespace WebSCR_data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string CssColor {
get {
return ((string)(this[this.tablev_ImpegniCal.CssColorColumn]));
}
set {
this[this.tablev_ImpegniCal.CssColorColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool IsNomeImpegnoNull() {
@@ -9265,6 +9292,7 @@ SELECT CodCliente, Cognome, Nome, CodFis, Tel, Cell, Email, Indir_01, Cap_01, Lo
tableMapping.ColumnMappings.Add("Inizio", "Inizio");
tableMapping.ColumnMappings.Add("Fine", "Fine");
tableMapping.ColumnMappings.Add("CodSquadra", "CodSquadra");
tableMapping.ColumnMappings.Add("CssColor", "CssColor");
this._adapter.TableMappings.Add(tableMapping);
}
+8
View File
@@ -674,6 +674,7 @@ FROM v_elencoImpegni</CommandText>
<Mapping SourceColumn="Inizio" DataSetColumn="Inizio" />
<Mapping SourceColumn="Fine" DataSetColumn="Fine" />
<Mapping SourceColumn="CodSquadra" DataSetColumn="CodSquadra" />
<Mapping SourceColumn="CssColor" DataSetColumn="CssColor" />
</Mappings>
<Sources>
<DbSource ConnectionRef="WebSCRConnectionString (Settings)" DbObjectName="WebSCR.dbo.stp_ImpCal_getByDay" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByDate" GetMethodModifier="Public" GetMethodName="getByDate" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByDate" UserSourceName="getByDate">
@@ -1123,6 +1124,13 @@ SELECT Data, CodSquadra, OreDisp, NumOp, MinDisp FROM Disponibilita WHERE (CodSq
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CssColor" msprop:Generator_ColumnVarNameInTable="columnCssColor" msprop:Generator_ColumnPropNameInRow="CssColor" msprop:Generator_ColumnPropNameInTable="CssColorColumn" msprop:Generator_UserColumnName="CssColor">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Binary file not shown.
Binary file not shown.
Binary file not shown.