Completata gestione move degli eventi...
This commit is contained in:
Binary file not shown.
@@ -28,12 +28,17 @@
|
||||
TimeFormat="Clock24Hours"
|
||||
CssClassPrefix="calendar_white"
|
||||
ViewType="Day"
|
||||
HeightSpec="BusinessHours"
|
||||
BusinessBeginsHour="8"
|
||||
BusinessEndsHour="20"
|
||||
ScrollPositionHour="12"
|
||||
ScrollPositionHour="13"
|
||||
ShowEventStartEnd="True"
|
||||
DataSourceID="ods"
|
||||
DataValueField="IdxImpegno" TimeRangeSelectedHandling="CallBack"></DayPilot:DayPilotCalendar>
|
||||
DataValueField="IdxImpegno"
|
||||
TimeRangeSelectedHandling="CallBack"
|
||||
EventMoveHandling="CallBack"
|
||||
CellHeight="15" EventClickHandling="Disabled">
|
||||
</DayPilot:DayPilotCalendar>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByDate" TypeName="WebSCR_data.DS_ApplicazioneTableAdapters.v_ImpegniCalTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="lblData" Name="Data" PropertyName="Text" Type="DateTime" />
|
||||
|
||||
@@ -26,16 +26,16 @@ namespace WebSCR.WebUserControls
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
DayPilotCalendar1.TimeRangeSelected += DayPilotCalendar1_TimeRangeSelected;
|
||||
DayPilotCalendar1.EventClick +=DayPilotCalendar1_EventClick;
|
||||
DayPilotCalendar1.EventMove += DayPilotCalendar1_EventMove;
|
||||
}
|
||||
|
||||
private void DayPilotCalendar1_EventClick(object sender, DayPilot.Web.Ui.Events.EventClickEventArgs e)
|
||||
void DayPilotCalendar1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
|
||||
{
|
||||
// selezionato periodo, salvo evento inizio...
|
||||
DtProxy.man.taImp.insertQuery(e.Start, "Gialla", memLayer.ML.StringSessionObj("CodCliente"), "OC123456", "indirizzo1", "12345", "localita", "GG");
|
||||
DayPilotCalendar1.DataBind();
|
||||
reportEvent();
|
||||
// sposto evento!
|
||||
DtProxy.man.taImp.updStart(Convert.ToInt32(e.Id), e.NewStart);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// evento selezione periodo inizio
|
||||
/// </summary>
|
||||
@@ -43,9 +43,21 @@ namespace WebSCR.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
void DayPilotCalendar1_TimeRangeSelected(object sender, DayPilot.Web.Ui.Events.TimeRangeSelectedEventArgs e)
|
||||
{
|
||||
// selezionato periodo, salvo evento inizio...
|
||||
DtProxy.man.taImp.insertQuery(e.Start, "Gialla", memLayer.ML.StringSessionObj("CodCliente"), "OC123456", "indirizzo1", "12345", "localita", "GG");
|
||||
// se ho squadra selezionata...
|
||||
if (rblSquadre.SelectedIndex >= 0)
|
||||
{
|
||||
// selezionato periodo, salvo evento inizio...
|
||||
DtProxy.man.taImp.insertQuery(e.Start, rblSquadre.SelectedValue, memLayer.ML.StringSessionObj("CodCliente"), "OC123456", "indirizzo1", "12345", "localita", "GG");
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
//ods.DataBind();
|
||||
//rblSquadre.SelectedIndex = -1;
|
||||
DayPilotCalendar1.DataBind();
|
||||
DayPilotCalendar1.Update();
|
||||
reportEvent();
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Generated
+42
-1
@@ -8560,7 +8560,7 @@ SELECT CodCliente, Cognome, Nome, CodFis, Tel, Cell, Email, Indir_01, Cap_01, Lo
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
private void InitCommandCollection() {
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5];
|
||||
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_elencoImpegni";
|
||||
@@ -8590,6 +8590,13 @@ SELECT CodCliente, Cognome, Nome, CodFis, Tel, Cell, Email, Indir_01, Cap_01, Lo
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cap", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Localita", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Prov", global::System.Data.SqlDbType.NVarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[4].Connection = this.Connection;
|
||||
this._commandCollection[4].CommandText = "dbo.stp_Imp_updStart";
|
||||
this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxImpegno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOraNew", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -8719,6 +8726,40 @@ SELECT CodCliente, Cognome, Nome, CodFis, Tel, Cell, Email, Indir_01, Cap_01, Lo
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int updStart(global::System.Nullable<int> IdxImpegno, global::System.Nullable<global::System.DateTime> DataOraNew) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
|
||||
if ((IdxImpegno.HasValue == true)) {
|
||||
command.Parameters[1].Value = ((int)(IdxImpegno.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((DataOraNew.HasValue == true)) {
|
||||
command.Parameters[2].Value = ((System.DateTime)(DataOraNew.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
|
||||
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
|
||||
!= global::System.Data.ConnectionState.Open)) {
|
||||
command.Connection.Open();
|
||||
}
|
||||
int returnValue;
|
||||
try {
|
||||
returnValue = command.ExecuteNonQuery();
|
||||
}
|
||||
finally {
|
||||
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
||||
command.Connection.Close();
|
||||
}
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -591,6 +591,18 @@ FROM v_elencoImpegni</CommandText>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="WebSCRConnectionString (Settings)" DbObjectName="WebSCR.dbo.stp_Imp_updStart" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="updStart" Modifier="Public" Name="updStart" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="updStart">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_Imp_updStart</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@IdxImpegno" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DataOraNew" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</Sources>
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DispImpTotTableAdapter" GeneratorDataComponentClassName="DispImpTotTableAdapter" Name="DispImpTot" UserDataComponentName="DispImpTotTableAdapter">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Shape ID="DesignTable:AnagZone" ZOrder="10" X="556" Y="160" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:AnagTipoConsegne" ZOrder="9" X="919" Y="164" Height="267" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:AnagClienti" ZOrder="4" X="362" Y="191" Height="402" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="332" />
|
||||
<Shape ID="DesignTable:Impegni" ZOrder="8" X="32" Y="190" Height="592" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="484" />
|
||||
<Shape ID="DesignTable:Impegni" ZOrder="8" X="32" Y="190" Height="611" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="484" />
|
||||
<Shape ID="DesignTable:DispImpTot" ZOrder="5" X="890" Y="469" Height="172" Width="293" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:DispImpSquadre" ZOrder="6" X="1026" Y="671" Height="153" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:v_ImpegniCal" ZOrder="1" X="450" Y="797" Height="191" Width="222" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user