diff --git a/GPW_Admin/WebUserControls/mod_adminOrario.ascx b/GPW_Admin/WebUserControls/mod_adminOrario.ascx
index e0cbfeb..2b706df 100644
--- a/GPW_Admin/WebUserControls/mod_adminOrario.ascx
+++ b/GPW_Admin/WebUserControls/mod_adminOrario.ascx
@@ -13,17 +13,17 @@
+
+
+
-
-
+
+
-
-
+
+
-
-
-
@@ -45,17 +45,15 @@
+
+
+
-
-
+
+
-
-
-
-
-
@@ -74,7 +72,6 @@
-
@@ -94,7 +91,6 @@
-
diff --git a/GPW_Admin/WebUserControls/mod_adminOrario.ascx.cs b/GPW_Admin/WebUserControls/mod_adminOrario.ascx.cs
index c0ecf07..54bd543 100644
--- a/GPW_Admin/WebUserControls/mod_adminOrario.ascx.cs
+++ b/GPW_Admin/WebUserControls/mod_adminOrario.ascx.cs
@@ -12,45 +12,51 @@ namespace GPW_Admin.WebUserControls
{
public partial class mod_adminOrario : System.Web.UI.UserControl
{
- #region area standard (non modificare)
+ #region Public Events
- #region gestione eventi
-
- public event EventHandler eh_resetSelezione;
public event EventHandler eh_nuovoValore;
- #endregion
+ public event EventHandler eh_resetSelezione;
+
+ #endregion Public Events
+
+ #region Public Properties
///
- /// effettua traduzione del lemma
+ /// controllo stato licenze!
///
- ///
- ///
- public string traduci(string lemma)
+ public bool chkLicOk
{
- return user_std.UtSn.Traduci(lemma);
+ get
+ {
+ return (licenzeGPW.checkLicenze);
+ }
}
+
+ #endregion Public Properties
+
+ #region Protected Methods
+
///
- /// caricamento
+ /// gestione evento richiesta nuovo valore (mostra footer, ...)
///
///
///
- protected void Page_Load(object sender, EventArgs e)
+ protected void btnNew_Click(object sender, EventArgs e)
{
- grView.PageSize = utils.pageSize;
- }
- ///
- /// resetta la selezione dei valori in caso di modifiche su altri controlli
- ///
- public void resetSelezione()
- {
- grView.SelectedIndex = -1;
+ // reset selezione...
+ resetSelezione();
+ // inserisco record
+ DataProxy.DP.taAO.insertQuery("0000 (new)", "descrizione");
+ //update!
grView.DataBind();
- if (eh_resetSelezione != null)
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
{
- eh_resetSelezione(this, new EventArgs());
+ eh_nuovoValore(this, new EventArgs());
}
}
+
///
/// reset della selezione
///
@@ -60,26 +66,21 @@ namespace GPW_Admin.WebUserControls
{
resetSelezione();
}
+
///
- /// inserisce nuovo valore da footer
+ /// elenco colonne del datagrid
///
- ///
- ///
- protected void lblIns_click(object sender, EventArgs e)
+ ///
+ protected DataColumnCollection colonneObj()
{
- // click su inserimento, chiamo il metodo insert dell'ObjectDataSource
- ods.Insert();
- }
- ///
- /// annulla inserimento nuovo valore da footer
- ///
- ///
- ///
- protected void lblCanc_click(object sender, EventArgs e)
- {
- // annullo inserimento: nascondo footer, bind controlli...
- grView.FooterRow.Visible = false;
+ DataColumnCollection colonne = null;
+ using (DS_Applicazione.AnagOrariDataTable tabella = new DS_Applicazione.AnagOrariDataTable())
+ {
+ colonne = tabella.Columns;
+ }
+ return colonne;
}
+
///
/// traduce gli header delle colonne
///
@@ -90,7 +91,7 @@ namespace GPW_Admin.WebUserControls
if (grView.Rows.Count > 0)
{
LinkButton lb;
- // aggiorno gli headers
+ // aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
@@ -110,74 +111,57 @@ namespace GPW_Admin.WebUserControls
}
}
- #endregion
-
- #region area CUSTOM (da modificare)
-
///
- /// elenco colonne del datagrid
- ///
- ///
- protected DataColumnCollection colonneObj()
- {
- DataColumnCollection colonne = null;
- using (DS_Applicazione.AnagOrariDataTable tabella = new DS_Applicazione.AnagOrariDataTable())
- {
- colonne = tabella.Columns;
- }
- return colonne;
- }
- ///
- /// determina se sia eliminabile il record (=non usato)
- ///
- ///
- ///
- public bool delEnabled(object idxObj)
- {
- bool answ = true;
- // solo se ha diritti scrittura controllo
- if (idxObj != null)
- {
- int trovati = 0;
- // controllo se ci siano tipo celle associate
- trovati = DataProxy.DP.taDipendenti.getByCodOrario(idxObj.ToString()).Rows.Count;
- // controllo se ci sono record correlati...
- if (trovati > 0)
- {
- answ = false;
- }
- }
- return answ;
- }
- ///
- /// gestione evento richiesta nuovo valore (mostra footer, ...)
+ /// annulla inserimento nuovo valore da footer
///
///
///
- protected void btnNew_Click(object sender, EventArgs e)
+ protected void lblCanc_click(object sender, EventArgs e)
{
- // reset selezione...
- resetSelezione();
- // inserisco record
- DataProxy.DP.taAO.Insert("0000 (new)", "descrizione", 0, 0, false, 0, 0, 0, 0, 0, 0, 0, DateTime.Today.TimeOfDay, DateTime.Today.TimeOfDay, null, null, null, null);
- //update!
- grView.DataBind();
- // sollevo evento nuovo valore...
- if (eh_nuovoValore != null)
- {
- eh_nuovoValore(this, new EventArgs());
- }
+ // annullo inserimento: nascondo footer, bind controlli...
+ grView.FooterRow.Visible = false;
}
+
///
- /// controllo stato licenze!
+ /// inserisce nuovo valore da footer
///
- public bool chkLicOk
+ ///
+ ///
+ protected void lblIns_click(object sender, EventArgs e)
{
- get
+ // click su inserimento, chiamo il metodo insert dell'ObjectDataSource
+ ods.Insert();
+ }
+
+ ///
+ /// check licenze in fase di update...
+ ///
+ ///
+ ///
+ protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ if (!licenzeGPW.checkLicenze)
{
- return (licenzeGPW.checkLicenze);
+ if (e != null)
+ {
+ // annullo insert se licenze sforate...
+ e.Cancel = true;
+ grView.EditIndex = -1;
+ grView.DataBind();
+ }
}
}
+
+ ///
+ /// caricamento
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ grView.PageSize = utils.pageSize;
+ }
+
///
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
@@ -216,12 +200,15 @@ namespace GPW_Admin.WebUserControls
case "textBox":
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
break;
+
case "dropDownList":
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
break;
+
case "checkBox":
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
break;
+
default:
break;
}
@@ -236,25 +223,57 @@ namespace GPW_Admin.WebUserControls
}
}
}
+
+ #endregion Protected Methods
+
+ #region Public Methods
+
///
- /// check licenze in fase di update...
+ /// determina se sia eliminabile il record (=non usato)
///
- ///
- ///
- protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ ///
+ ///
+ public bool delEnabled(object idxObj)
{
- if (!licenzeGPW.checkLicenze)
+ bool answ = true;
+ // solo se ha diritti scrittura controllo
+ if (idxObj != null)
{
- if (e != null)
+ int trovati = 0;
+ // controllo se ci siano tipo celle associate
+ trovati = DataProxy.DP.taDipendenti.getByCodOrario(idxObj.ToString()).Rows.Count;
+ // controllo se ci sono record correlati...
+ if (trovati > 0)
{
- // annullo insert se licenze sforate...
- e.Cancel = true;
- grView.EditIndex = -1;
- grView.DataBind();
+ answ = false;
}
}
+ return answ;
+ }
+
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ if (eh_resetSelezione != null)
+ {
+ eh_resetSelezione(this, new EventArgs());
+ }
}
- #endregion
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+
+ #endregion Public Methods
}
}
\ No newline at end of file
diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs
index c4eaeff..644dd7d 100644
--- a/GPW_Data/DS_Applicazione.Designer.cs
+++ b/GPW_Data/DS_Applicazione.Designer.cs
@@ -27679,7 +27679,7 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun, " +
@@ -27694,28 +27694,34 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_codOrario", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
- this._commandCollection[2].CommandText = "dbo.stp_AO_updateQuery";
+ this._commandCollection[2].CommandText = "dbo.stp_AO_insertQuery";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codOrario", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@descOrario", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreOrdSett", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreStraordAss", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@autoCompOreOrd", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreLun", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreMar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreMer", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreGio", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreVen", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreSab", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreDom", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraInizio_1", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraFine_1", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraInizio_2", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraFine_2", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraInizio_3", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraFine_3", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_codOrario", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[3].Connection = this.Connection;
+ this._commandCollection[3].CommandText = "dbo.stp_AO_updateQuery";
+ this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codOrario", 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("@descOrario", global::System.Data.SqlDbType.NVarChar, 250, 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("@oreStraordAss", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@autoCompOreOrd", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreLun", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreMar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreMer", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreGio", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreVen", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreSab", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oreDom", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraInizio_1", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraFine_1", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraInizio_2", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraFine_2", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraInizio_3", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@oraFine_3", global::System.Data.SqlDbType.Time, 5, global::System.Data.ParameterDirection.Input, 16, 7, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_codOrario", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -28478,6 +28484,40 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
return returnValue;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int insertQuery(string codOrario, string descOrario) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
+ if ((codOrario == null)) {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[1].Value = ((string)(codOrario));
+ }
+ if ((descOrario == null)) {
+ command.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[2].Value = ((string)(descOrario));
+ }
+ 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;
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
@@ -28485,7 +28525,6 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
public virtual int updateQuery(
string codOrario,
string descOrario,
- global::System.Nullable oreOrdSett,
global::System.Nullable oreStraordAss,
global::System.Nullable autoCompOreOrd,
global::System.Nullable oreLun,
@@ -28502,7 +28541,7 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
global::System.Nullable oraInizio_3,
global::System.Nullable oraFine_3,
string Original_codOrario) {
- global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
if ((codOrario == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -28515,107 +28554,101 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
else {
command.Parameters[2].Value = ((string)(descOrario));
}
- if ((oreOrdSett.HasValue == true)) {
- command.Parameters[3].Value = ((double)(oreOrdSett.Value));
+ if ((oreStraordAss.HasValue == true)) {
+ command.Parameters[3].Value = ((double)(oreStraordAss.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
- if ((oreStraordAss.HasValue == true)) {
- command.Parameters[4].Value = ((double)(oreStraordAss.Value));
+ if ((autoCompOreOrd.HasValue == true)) {
+ command.Parameters[4].Value = ((bool)(autoCompOreOrd.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
- if ((autoCompOreOrd.HasValue == true)) {
- command.Parameters[5].Value = ((bool)(autoCompOreOrd.Value));
+ if ((oreLun.HasValue == true)) {
+ command.Parameters[5].Value = ((double)(oreLun.Value));
}
else {
command.Parameters[5].Value = global::System.DBNull.Value;
}
- if ((oreLun.HasValue == true)) {
- command.Parameters[6].Value = ((double)(oreLun.Value));
+ if ((oreMar.HasValue == true)) {
+ command.Parameters[6].Value = ((double)(oreMar.Value));
}
else {
command.Parameters[6].Value = global::System.DBNull.Value;
}
- if ((oreMar.HasValue == true)) {
- command.Parameters[7].Value = ((double)(oreMar.Value));
+ if ((oreMer.HasValue == true)) {
+ command.Parameters[7].Value = ((double)(oreMer.Value));
}
else {
command.Parameters[7].Value = global::System.DBNull.Value;
}
- if ((oreMer.HasValue == true)) {
- command.Parameters[8].Value = ((double)(oreMer.Value));
+ if ((oreGio.HasValue == true)) {
+ command.Parameters[8].Value = ((double)(oreGio.Value));
}
else {
command.Parameters[8].Value = global::System.DBNull.Value;
}
- if ((oreGio.HasValue == true)) {
- command.Parameters[9].Value = ((double)(oreGio.Value));
+ if ((oreVen.HasValue == true)) {
+ command.Parameters[9].Value = ((double)(oreVen.Value));
}
else {
command.Parameters[9].Value = global::System.DBNull.Value;
}
- if ((oreVen.HasValue == true)) {
- command.Parameters[10].Value = ((double)(oreVen.Value));
+ if ((oreSab.HasValue == true)) {
+ command.Parameters[10].Value = ((double)(oreSab.Value));
}
else {
command.Parameters[10].Value = global::System.DBNull.Value;
}
- if ((oreSab.HasValue == true)) {
- command.Parameters[11].Value = ((double)(oreSab.Value));
+ if ((oreDom.HasValue == true)) {
+ command.Parameters[11].Value = ((double)(oreDom.Value));
}
else {
command.Parameters[11].Value = global::System.DBNull.Value;
}
- if ((oreDom.HasValue == true)) {
- command.Parameters[12].Value = ((double)(oreDom.Value));
+ if ((oraInizio_1.HasValue == true)) {
+ command.Parameters[12].Value = ((System.TimeSpan)(oraInizio_1.Value));
}
else {
command.Parameters[12].Value = global::System.DBNull.Value;
}
- if ((oraInizio_1.HasValue == true)) {
- command.Parameters[13].Value = ((System.TimeSpan)(oraInizio_1.Value));
+ if ((oraFine_1.HasValue == true)) {
+ command.Parameters[13].Value = ((System.TimeSpan)(oraFine_1.Value));
}
else {
command.Parameters[13].Value = global::System.DBNull.Value;
}
- if ((oraFine_1.HasValue == true)) {
- command.Parameters[14].Value = ((System.TimeSpan)(oraFine_1.Value));
+ if ((oraInizio_2.HasValue == true)) {
+ command.Parameters[14].Value = ((System.TimeSpan)(oraInizio_2.Value));
}
else {
command.Parameters[14].Value = global::System.DBNull.Value;
}
- if ((oraInizio_2.HasValue == true)) {
- command.Parameters[15].Value = ((System.TimeSpan)(oraInizio_2.Value));
+ if ((oraFine_2.HasValue == true)) {
+ command.Parameters[15].Value = ((System.TimeSpan)(oraFine_2.Value));
}
else {
command.Parameters[15].Value = global::System.DBNull.Value;
}
- if ((oraFine_2.HasValue == true)) {
- command.Parameters[16].Value = ((System.TimeSpan)(oraFine_2.Value));
+ if ((oraInizio_3.HasValue == true)) {
+ command.Parameters[16].Value = ((System.TimeSpan)(oraInizio_3.Value));
}
else {
command.Parameters[16].Value = global::System.DBNull.Value;
}
- if ((oraInizio_3.HasValue == true)) {
- command.Parameters[17].Value = ((System.TimeSpan)(oraInizio_3.Value));
+ if ((oraFine_3.HasValue == true)) {
+ command.Parameters[17].Value = ((System.TimeSpan)(oraFine_3.Value));
}
else {
command.Parameters[17].Value = global::System.DBNull.Value;
}
- if ((oraFine_3.HasValue == true)) {
- command.Parameters[18].Value = ((System.TimeSpan)(oraFine_3.Value));
- }
- else {
+ if ((Original_codOrario == null)) {
command.Parameters[18].Value = global::System.DBNull.Value;
}
- if ((Original_codOrario == null)) {
- command.Parameters[19].Value = global::System.DBNull.Value;
- }
else {
- command.Parameters[19].Value = ((string)(Original_codOrario));
+ command.Parameters[18].Value = ((string)(Original_codOrario));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd
index 4b75619..8fa845a 100644
--- a/GPW_Data/DS_Applicazione.xsd
+++ b/GPW_Data/DS_Applicazione.xsd
@@ -2283,6 +2283,18 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
+
+
+
+ dbo.stp_AO_insertQuery
+
+
+
+
+
+
+
+
@@ -2291,7 +2303,6 @@ SELECT codOrario, descOrario, oreOrdSett, oreStraordAss, autoCompOreOrd, oreLun,
-
@@ -2902,7 +2913,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -2926,7 +2937,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -2983,7 +2994,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3021,7 +3032,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3149,7 +3160,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3249,7 +3260,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3301,7 +3312,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3315,7 +3326,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3365,7 +3376,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3401,7 +3412,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3421,7 +3432,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3442,7 +3453,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3478,7 +3489,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3503,7 +3514,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3519,7 +3530,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3540,7 +3551,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3606,7 +3617,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3654,7 +3665,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3695,7 +3706,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3716,7 +3727,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3725,7 +3736,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
+
@@ -3829,12 +3840,12 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GPW_Data/DS_Applicazione.xss b/GPW_Data/DS_Applicazione.xss
index 7d8b784..58f9683 100644
--- a/GPW_Data/DS_Applicazione.xss
+++ b/GPW_Data/DS_Applicazione.xss
@@ -4,29 +4,29 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -101,7 +101,7 @@
-
+
279