diff --git a/ScheMe-PIC/PREN.aspx b/ScheMe-PIC/PREN.aspx new file mode 100644 index 0000000..91d3d44 --- /dev/null +++ b/ScheMe-PIC/PREN.aspx @@ -0,0 +1,11 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="PREN.aspx.cs" Inherits="ScheMe.PREN" %> + +<%@ Register Src="~/WebUserControls/mod_Prenotazioni.ascx" TagPrefix="uc1" TagName="mod_Prenotazioni" %> + + + + + + + + diff --git a/ScheMe-PIC/PREN.aspx.cs b/ScheMe-PIC/PREN.aspx.cs new file mode 100644 index 0000000..54b845e --- /dev/null +++ b/ScheMe-PIC/PREN.aspx.cs @@ -0,0 +1,43 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace ScheMe +{ + public partial class PREN : System.Web.UI.Page + { + protected int idxPaziente + { + get + { + return memLayer.ML.IntSessionObj("IdxPaziente"); + } + } + protected DateTime DataVisita + { + get + { + DateTime answ = DateTime.Now.Date; + try + { + answ = memLayer.ML.QSD("DataVisita"); + } + catch + { } + return answ; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if(!Page.IsPostBack) + { + mod_Prenotazioni.idxPaziente = idxPaziente; + mod_Prenotazioni.DataVisita = DataVisita; + } + } + } +} \ No newline at end of file diff --git a/ScheMe-PIC/PREN.aspx.designer.cs b/ScheMe-PIC/PREN.aspx.designer.cs new file mode 100644 index 0000000..aa6f0e7 --- /dev/null +++ b/ScheMe-PIC/PREN.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace ScheMe { + + + public partial class PREN { + + /// + /// Controllo mod_Prenotazioni. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ScheMe.WebUserControls.mod_Prenotazioni mod_Prenotazioni; + } +} diff --git a/ScheMe-PIC/ScheMe-PIC.csproj b/ScheMe-PIC/ScheMe-PIC.csproj index d822fdc..4dd7970 100644 --- a/ScheMe-PIC/ScheMe-PIC.csproj +++ b/ScheMe-PIC/ScheMe-PIC.csproj @@ -197,6 +197,7 @@ + @@ -220,6 +221,7 @@ + @@ -390,6 +392,13 @@ jumper.aspx + + PREN.aspx + ASPXCodeBehind + + + PREN.aspx + True @@ -569,6 +578,13 @@ mod_genCalPren.ascx + + mod_Prenotazioni.ascx + ASPXCodeBehind + + + mod_Prenotazioni.ascx + mod_PrestPAI.ascx ASPXCodeBehind diff --git a/ScheMe-PIC/VPAI.aspx b/ScheMe-PIC/VPAI.aspx index 6dfec8e..cfe1292 100644 --- a/ScheMe-PIC/VPAI.aspx +++ b/ScheMe-PIC/VPAI.aspx @@ -98,9 +98,14 @@ Budget - <%# Eval("CurrSpesa","{0:C2}") %> + <%# Eval("SpesaPrev","{0:C2}") %> PAI(prev) + + <%# Eval("Prenotazioni","{0:C2}") %> + Prenotazioni + + Genera PDC diff --git a/ScheMe-PIC/WebUserControls/mod_ElencoVisitePaziente.ascx b/ScheMe-PIC/WebUserControls/mod_ElencoVisitePaziente.ascx index 14d9b27..3696a97 100644 --- a/ScheMe-PIC/WebUserControls/mod_ElencoVisitePaziente.ascx +++ b/ScheMe-PIC/WebUserControls/mod_ElencoVisitePaziente.ascx @@ -71,7 +71,7 @@ - + <%#Eval("PREN")%> diff --git a/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx b/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx new file mode 100644 index 0000000..c8c2c6a --- /dev/null +++ b/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx @@ -0,0 +1,163 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_Prenotazioni.ascx.cs" Inherits="ScheMe.WebUserControls.mod_Prenotazioni" %> + + + Crea Nuova + + + + + + + + + + + + + + + + Nessun Record + + + + + + + + + + + + + + + + + + <%# Eval("DataVisita","{0:yyyy-MM-dd}") %> | <%# Eval("DescStato") %> + + + + + + + + + <%# Eval("DescStruttura") %> + + + + + + + + <%# Eval("CodPres") %> + + + Cod + + Note + + + + + + + + + + + + + + + + + <%# Eval("NomePrest") %> + + + + <%# Eval("Note") %> + + + <%# Eval("DescrPrest") %> + + + + + + + + + <%# Eval("Tariffa", "{0:C2}") %> + + + + + + + <%# Eval("Tariffa", "{0:C2}") %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + diff --git a/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx.cs b/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx.cs new file mode 100644 index 0000000..6bd6677 --- /dev/null +++ b/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx.cs @@ -0,0 +1,113 @@ +using ScheMe_Data; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace ScheMe.WebUserControls +{ + public partial class mod_Prenotazioni : SteamWare.UserControl + { + /// + /// url base area services + /// + public string serviceUrl(string method) + { + return string.Format("/{0}/WS_data.asmx/{1}", memLayer.ML.confReadString("serviceUrl"), method); + } + public int idxPaziente + { + get + { + int answ = 0; + Int32.TryParse(hfIdxPaziente.Value, out answ); + return answ; + } + set + { + hfIdxPaziente.Value = value.ToString(); + } + } + + public DateTime DataVisita + { + get + { + DateTime answ; + DateTime.TryParse(hfDataVisita.Value, out answ); + return answ; + } + set + { + hfDataVisita.Value = value.ToString(); + } + } + + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e) + { + //raiseEvent(ucEvType.ReqUpdateParent); + } + + public bool hasData(object testData) + { + bool answ = false; + try + { + answ = testData.ToString() != ""; + } + catch + { } + return answ; + } + + protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + { + DateTime data; + DateTime.TryParse(e.InputParameters["DataVisita"].ToString(), out data); + e.InputParameters["DataVisita"] = data; + //raiseEvent(ucEvType.ReqUpdateParent); + } + + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + //raiseEvent(ucEvType.ReqUpdateParent); + } + /// + /// Aggiorna il controllo e indica come in editing il primo record... + /// + public void updateAndEditZero() + { + grView.DataBind(); + grView.EditIndex = 0; + } + + protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e) + { + try + { + if (e.NewValues["Note"].ToString() == "" || e.NewValues["Note"] == null) + { + e.NewValues["Note"] = ""; + } + } + catch + { + e.NewValues["Note"] = ""; + } + } + + protected void lbCreateNew_Click(object sender, EventArgs e) + { + DtProxy.man.taPren.InsertQuery(idxPaziente, DataVisita, "0", 0, 0, ""); + grView.DataBind(); + } + } +} \ No newline at end of file diff --git a/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx.designer.cs b/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx.designer.cs new file mode 100644 index 0000000..c40af52 --- /dev/null +++ b/ScheMe-PIC/WebUserControls/mod_Prenotazioni.ascx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace ScheMe.WebUserControls { + + + public partial class mod_Prenotazioni { + + /// + /// Controllo lbCreateNew. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbCreateNew; + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo hfIdxPaziente. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfIdxPaziente; + + /// + /// Controllo hfDataVisita. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfDataVisita; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo odsPrest. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsPrest; + + /// + /// Controllo odsStato. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsStato; + + /// + /// Controllo odsStruttura. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsStruttura; + } +} diff --git a/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx b/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx index 50c3fda..150f497 100644 --- a/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx +++ b/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx @@ -1,7 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PrestPAI.ascx.cs" Inherits="ScheMe.WebUserControls.mod_PrestPAI" %> -<%--<%@ Register Src="~/WebUserControls/mod_autocompleteShort.ascx" TagPrefix="uc1" TagName="mod_autocompleteShort" %>--%> -<%----%> + diff --git a/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx.cs b/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx.cs index 8f8101e..a2c08a5 100644 --- a/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx.cs +++ b/ScheMe-PIC/WebUserControls/mod_PrestPAI.ascx.cs @@ -31,7 +31,8 @@ namespace ScheMe.WebUserControls } } - public DateTime DataVisita { + public DateTime DataVisita + { get { DateTime answ; diff --git a/ScheMe_Data/DS_Applicazione.Designer.cs b/ScheMe_Data/DS_Applicazione.Designer.cs index fcbf06a..22c92e0 100644 --- a/ScheMe_Data/DS_Applicazione.Designer.cs +++ b/ScheMe_Data/DS_Applicazione.Designer.cs @@ -8815,7 +8815,9 @@ namespace ScheMe_Data { private global::System.Data.DataColumn columnBudgetSpesa; - private global::System.Data.DataColumn columnCurrSpesa; + private global::System.Data.DataColumn columnSpesaPrev; + + private global::System.Data.DataColumn columnPrenotazioni; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] @@ -8908,9 +8910,17 @@ namespace ScheMe_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public global::System.Data.DataColumn CurrSpesaColumn { + public global::System.Data.DataColumn SpesaPrevColumn { get { - return this.columnCurrSpesa; + return this.columnSpesaPrev; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn PrenotazioniColumn { + get { + return this.columnPrenotazioni; } } @@ -8951,7 +8961,7 @@ namespace ScheMe_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public VisPAIRow AddVisPAIRow(int IdxPaziente, System.DateTime DataVisita, int CodPatologia, int Livello, int Classe, string Note, decimal BudgetSpesa, double CurrSpesa) { + public VisPAIRow AddVisPAIRow(int IdxPaziente, System.DateTime DataVisita, int CodPatologia, int Livello, int Classe, string Note, decimal BudgetSpesa, double SpesaPrev, int Prenotazioni) { VisPAIRow rowVisPAIRow = ((VisPAIRow)(this.NewRow())); object[] columnValuesArray = new object[] { IdxPaziente, @@ -8961,7 +8971,8 @@ namespace ScheMe_Data { Classe, Note, BudgetSpesa, - CurrSpesa}; + SpesaPrev, + Prenotazioni}; rowVisPAIRow.ItemArray = columnValuesArray; this.Rows.Add(rowVisPAIRow); return rowVisPAIRow; @@ -8999,7 +9010,8 @@ namespace ScheMe_Data { this.columnClasse = base.Columns["Classe"]; this.columnNote = base.Columns["Note"]; this.columnBudgetSpesa = base.Columns["BudgetSpesa"]; - this.columnCurrSpesa = base.Columns["CurrSpesa"]; + this.columnSpesaPrev = base.Columns["SpesaPrev"]; + this.columnPrenotazioni = base.Columns["Prenotazioni"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9019,8 +9031,10 @@ namespace ScheMe_Data { base.Columns.Add(this.columnNote); this.columnBudgetSpesa = new global::System.Data.DataColumn("BudgetSpesa", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnBudgetSpesa); - this.columnCurrSpesa = new global::System.Data.DataColumn("CurrSpesa", typeof(double), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnCurrSpesa); + this.columnSpesaPrev = new global::System.Data.DataColumn("SpesaPrev", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSpesaPrev); + this.columnPrenotazioni = new global::System.Data.DataColumn("Prenotazioni", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrenotazioni); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnIdxPaziente, this.columnDataVisita}, true)); @@ -9032,7 +9046,8 @@ namespace ScheMe_Data { this.columnNote.AllowDBNull = false; this.columnNote.MaxLength = 250; this.columnBudgetSpesa.AllowDBNull = false; - this.columnCurrSpesa.ReadOnly = true; + this.columnSpesaPrev.ReadOnly = true; + this.columnPrenotazioni.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -17858,17 +17873,33 @@ namespace ScheMe_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public double CurrSpesa { + public double SpesaPrev { get { try { - return ((double)(this[this.tableVisPAI.CurrSpesaColumn])); + return ((double)(this[this.tableVisPAI.SpesaPrevColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'CurrSpesa\' nella tabella \'VisPAI\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'SpesaPrev\' nella tabella \'VisPAI\' è DBNull.", e); } } set { - this[this.tableVisPAI.CurrSpesaColumn] = value; + this[this.tableVisPAI.SpesaPrevColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int Prenotazioni { + get { + try { + return ((int)(this[this.tableVisPAI.PrenotazioniColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Prenotazioni\' nella tabella \'VisPAI\' è DBNull.", e); + } + } + set { + this[this.tableVisPAI.PrenotazioniColumn] = value; } } @@ -17885,14 +17916,26 @@ namespace ScheMe_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public bool IsCurrSpesaNull() { - return this.IsNull(this.tableVisPAI.CurrSpesaColumn); + public bool IsSpesaPrevNull() { + return this.IsNull(this.tableVisPAI.SpesaPrevColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void SetCurrSpesaNull() { - this[this.tableVisPAI.CurrSpesaColumn] = global::System.Convert.DBNull; + public void SetSpesaPrevNull() { + this[this.tableVisPAI.SpesaPrevColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPrenotazioniNull() { + return this.IsNull(this.tableVisPAI.PrenotazioniColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPrenotazioniNull() { + this[this.tableVisPAI.PrenotazioniColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -26656,7 +26699,8 @@ SELECT CodPatologia, Livello, DescrPatologia, BudgetSpesa, QuotaPIC FROM Patolog tableMapping.ColumnMappings.Add("Classe", "Classe"); tableMapping.ColumnMappings.Add("Note", "Note"); tableMapping.ColumnMappings.Add("BudgetSpesa", "BudgetSpesa"); - tableMapping.ColumnMappings.Add("CurrSpesa", "CurrSpesa"); + tableMapping.ColumnMappings.Add("SpesaPrev", "SpesaPrev"); + tableMapping.ColumnMappings.Add("Prenotazioni", "Prenotazioni"); this._adapter.TableMappings.Add(tableMapping); } @@ -26673,7 +26717,7 @@ SELECT CodPatologia, Livello, DescrPatologia, BudgetSpesa, QuotaPIC FROM Patolog 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 * FROM dbo.v_VisPAI"; + this._commandCollection[0].CommandText = "SELECT * FROM v_VisPAI"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -28564,20 +28608,59 @@ SELECT CodPres, CodAlt, Note, Ciclo, QtaMax, NotaQta, NomePrest, DescrPrest, Tar [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_Prenotazioni"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_Pren_GenByPAI"; + this._commandCollection[1].CommandText = "dbo.stp_PREN_DeleteQuery"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPaziente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StartDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EndDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxPaziente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodPres", global::System.Data.SqlDbType.NVarChar, 10, 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_PREN_getByPaziente"; + 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("@IdxPaziente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, 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_PREN_InsertQuery"; + 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("@IdxPaziente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodPres", 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("@IdxStato", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxStruttura", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 250, 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_Pren_GenByPAI"; + 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("@IdxPaziente", 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("@DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StartDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EndDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = "dbo.stp_PREN_UpdateQuery"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[5].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[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodPres", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxStato", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxStruttura", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataVisita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxPaziente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodPres", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -28607,8 +28690,129 @@ SELECT CodPres, CodAlt, Note, Ciclo, QtaMax, NotaQta, NomePrest, DescrPrest, Tar [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int stp_Pren_GenByPAI(global::System.Nullable IdxPaziente, global::System.Nullable DataVisita, global::System.Nullable StartDate, global::System.Nullable EndDate) { + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Applicazione.PrenotazioniDataTable getByPaziente(global::System.Nullable IdxPaziente, global::System.Nullable DataVisita) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((IdxPaziente.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxPaziente.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((DataVisita.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(DataVisita.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + DS_Applicazione.PrenotazioniDataTable dataTable = new DS_Applicazione.PrenotazioniDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int DeleteQuery(global::System.Nullable Original_IdxPaziente, global::System.Nullable Original_DataVisita, string Original_CodPres) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_IdxPaziente.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_IdxPaziente.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Original_DataVisita.HasValue == true)) { + command.Parameters[2].Value = ((System.DateTime)(Original_DataVisita.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_CodPres == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(Original_CodPres)); + } + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int InsertQuery(global::System.Nullable IdxPaziente, global::System.Nullable DataVisita, string CodPres, global::System.Nullable IdxStato, global::System.Nullable IdxStruttura, string Note) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((IdxPaziente.HasValue == true)) { + command.Parameters[1].Value = ((int)(IdxPaziente.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((DataVisita.HasValue == true)) { + command.Parameters[2].Value = ((System.DateTime)(DataVisita.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + if ((CodPres == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(CodPres)); + } + if ((IdxStato.HasValue == true)) { + command.Parameters[4].Value = ((int)(IdxStato.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((IdxStruttura.HasValue == true)) { + command.Parameters[5].Value = ((int)(IdxStruttura.Value)); + } + else { + command.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Note == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(Note)); + } + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int stp_Pren_GenByPAI(global::System.Nullable IdxPaziente, global::System.Nullable DataVisita, global::System.Nullable StartDate, global::System.Nullable EndDate) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((IdxPaziente.HasValue == true)) { command.Parameters[1].Value = ((int)(IdxPaziente.Value)); } @@ -28649,6 +28853,76 @@ SELECT CodPres, CodAlt, Note, Ciclo, QtaMax, NotaQta, NomePrest, DescrPrest, Tar } return returnValue; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int UpdateQuery(global::System.Nullable DataVisita, string CodPres, global::System.Nullable IdxStato, global::System.Nullable IdxStruttura, string Note, global::System.Nullable Original_DataVisita, global::System.Nullable Original_IdxPaziente, string Original_CodPres) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + if ((DataVisita.HasValue == true)) { + command.Parameters[1].Value = ((System.DateTime)(DataVisita.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((CodPres == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodPres)); + } + if ((IdxStato.HasValue == true)) { + command.Parameters[3].Value = ((int)(IdxStato.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } + if ((IdxStruttura.HasValue == true)) { + command.Parameters[4].Value = ((int)(IdxStruttura.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Note == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Note)); + } + if ((Original_DataVisita.HasValue == true)) { + command.Parameters[6].Value = ((System.DateTime)(Original_DataVisita.Value)); + } + else { + command.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_IdxPaziente.HasValue == true)) { + command.Parameters[7].Value = ((int)(Original_IdxPaziente.Value)); + } + else { + command.Parameters[7].Value = global::System.DBNull.Value; + } + if ((Original_CodPres == null)) { + command.Parameters[8].Value = global::System.DBNull.Value; + } + else { + command.Parameters[8].Value = ((string)(Original_CodPres)); + } + 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; + } } /// diff --git a/ScheMe_Data/DS_Applicazione.xsd b/ScheMe_Data/DS_Applicazione.xsd index 5adaab0..c0ce7e8 100644 --- a/ScheMe_Data/DS_Applicazione.xsd +++ b/ScheMe_Data/DS_Applicazione.xsd @@ -1612,7 +1612,7 @@ SELECT CodPatologia, Livello, DescrPatologia, BudgetSpesa, QuotaPIC FROM Patolog - SELECT * FROM dbo.v_VisPAI + SELECT * FROM v_VisPAI @@ -1626,7 +1626,8 @@ SELECT CodPatologia, Livello, DescrPatologia, BudgetSpesa, QuotaPIC FROM Patolog - + + @@ -1985,6 +1986,47 @@ FROM v_Prenotazioni + + + + dbo.stp_PREN_DeleteQuery + + + + + + + + + + + + + dbo.stp_PREN_getByPaziente + + + + + + + + + + + + dbo.stp_PREN_InsertQuery + + + + + + + + + + + + @@ -1999,6 +2041,24 @@ FROM v_Prenotazioni + + + + dbo.stp_PREN_UpdateQuery + + + + + + + + + + + + + + @@ -2009,7 +2069,7 @@ FROM v_Prenotazioni - + @@ -2104,7 +2164,7 @@ FROM v_Prenotazioni - + @@ -2127,7 +2187,7 @@ FROM v_Prenotazioni - + @@ -2150,7 +2210,7 @@ FROM v_Prenotazioni - + @@ -2178,7 +2238,7 @@ FROM v_Prenotazioni - + @@ -2195,7 +2255,7 @@ FROM v_Prenotazioni - + @@ -2684,7 +2744,7 @@ FROM v_Prenotazioni - + @@ -2736,7 +2796,7 @@ FROM v_Prenotazioni - + @@ -2750,10 +2810,10 @@ FROM v_Prenotazioni - + - + @@ -2764,7 +2824,7 @@ FROM v_Prenotazioni - + @@ -2787,7 +2847,7 @@ FROM v_Prenotazioni - + @@ -2806,7 +2866,7 @@ FROM v_Prenotazioni - + @@ -2843,7 +2903,7 @@ FROM v_Prenotazioni - + @@ -2859,11 +2919,12 @@ FROM v_Prenotazioni - + + - + @@ -2903,7 +2964,7 @@ FROM v_Prenotazioni - + @@ -3023,7 +3084,7 @@ FROM v_Prenotazioni - + @@ -3192,16 +3253,16 @@ FROM v_Prenotazioni - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/ScheMe_Data/DS_Applicazione.xss b/ScheMe_Data/DS_Applicazione.xss index 6cfca6d..2914c13 100644 --- a/ScheMe_Data/DS_Applicazione.xss +++ b/ScheMe_Data/DS_Applicazione.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -14,14 +14,14 @@ - + - + - + @@ -168,7 +168,7 @@ 1336 - 1363 + 1386