aggiunti metodi x VGen (CRUD)

This commit is contained in:
Samuele E. Locatelli
2014-04-24 11:18:34 +02:00
parent 67f9aeecaf
commit 72bb9f87b7
5 changed files with 392 additions and 27 deletions
+78 -14
View File
@@ -8,33 +8,97 @@
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="IdxPaziente,DataVisita" DataSourceID="ods" ForeColor="#333333" GridLines="None" Width="100%">
<AlternatingRowStyle BackColor="White" />
<Columns>
<%--<asp:BoundField DataField="IdxPaziente" HeaderText="IdxPaziente" ReadOnly="True" SortExpression="IdxPaziente" />--%>
<asp:BoundField DataField="DataVisita" HeaderText="Data" ReadOnly="True" SortExpression="DataVisita" HtmlEncodeFormatString="true" DataFormatString="{0:ddd dd/MM/yy}" />
<asp:BoundField DataField="Peso" HeaderText="Peso" SortExpression="Peso" />
<asp:BoundField DataField="Altezza" HeaderText="Altezza" SortExpression="Altezza" DataFormatString="{0:N3}" />
<asp:BoundField DataField="BMI" HeaderText="BMI" ReadOnly="True" SortExpression="BMI" DataFormatString="{0:N3}" />
<asp:BoundField DataField="CirconfVita" HeaderText="Circ.Vita" SortExpression="CirconfVita" DataFormatString="{0:N1}" />
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap;">
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-check ui-btn-icon-notext ui-btn-inline" ID="lbUpdate" runat="server" CausesValidation="False" CommandName="Update" Text="Update" />
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline" ID="lbCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</div>
</EditItemTemplate>
<ItemTemplate>
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap;">
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-notext ui-btn-inline" ID="lbEdit" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Data" SortExpression="DataVisita">
<EditItemTemplate>
<asp:TextBox ID="txtDataVisita" runat="server" Text='<%# Bind("DataVisita", "{0:dd/MM/yy}") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDataVisita" runat="server" Text='<%# Eval("DataVisita", "{0:dd/MM/yy}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Peso" SortExpression="Peso">
<EditItemTemplate>
<asp:TextBox ID="txtPeso" runat="server" Text='<%# Bind("Peso") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblPeso" runat="server" Text='<%# Eval("Peso", "{0:N1} kg") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Altezza" SortExpression="Altezza">
<EditItemTemplate>
<asp:TextBox ID="txtAlt" runat="server" Text='<%# Bind("Altezza") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblAlt" runat="server" Text='<%# Eval("Altezza", "{0:N2} m") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="BMI" HeaderText="BMI" ReadOnly="True" SortExpression="BMI" HtmlEncodeFormatString="true" DataFormatString="{0:N3}" ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundField>
<asp:TemplateField HeaderText="Circ.Vita" SortExpression="CirconfVita">
<EditItemTemplate>
<asp:TextBox ID="txtCV" runat="server" Text='<%# Bind("CirconfVita") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblCV" runat="server" Text='<%# Eval("CirconfVita", "{0:N1} cm") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Grasso Tot" SortExpression="GrassoTotPerc" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:TextBox ID="txtGTP" runat="server" Text='<%# Bind("GrassoTotPerc", "{0:P1}") %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblGTP" runat="server" Text='<%# Eval("GrassoTotPerc", "{0:P1}") %>' /> / <asp:Label ID="lblGT" runat="server" Text='<%# Eval("GrassoTot", "{0:N1} kg") %>' />
<asp:Label ID="lblGTP" runat="server" Text='<%# Eval("GrassoTotPerc", "{0:P1}") %>' />
<br />
<asp:Label ID="lblGT" runat="server" Text='<%# Eval("GrassoTot", "{0:N1} kg") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="GrassoViscPerc" SortExpression="GrassoViscPerc" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField HeaderText="Grasso Visc" SortExpression="GrassoViscPerc" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:TextBox ID="txtGVP" runat="server" Text='<%# Bind("GrassoViscPerc", "{0:P1}") %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblGVP" runat="server" Text='<%# Eval("GrassoViscPerc", "{0:P1}") %>' /> / <asp:Label ID="lblGV" runat="server" Text='<%# Eval("GrassoVisc", "{0:N1} kg") %>' />
<asp:Label ID="lblGVP" runat="server" Text='<%# Eval("GrassoViscPerc", "{0:P1}") %>' />
<br />
<asp:Label ID="lblGV" runat="server" Text='<%# Eval("GrassoVisc", "{0:N1} kg") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="GrassoViscTot" SortExpression="GrassoViscTot">
<asp:TemplateField HeaderText="Gr.Visc/Tot" SortExpression="GrassoViscTot" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Eval("GrassoViscTot", "{0:P1}") %>' />
<asp:Label ID="lblGVT" runat="server" Text='<%# Eval("GrassoViscTot", "{0:P1}") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="M.Magra" SortExpression="MassaMagraTotPerc">
<asp:TemplateField HeaderText="M.Magra" SortExpression="MassaMagraTotPerc" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:TextBox ID="txtMMT" runat="server" Text='<%# Bind("MassaMagraTotPerc", "{0:P1}") %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Eval("MassaMagraTotPerc", "{0:P1}") %>' />
<asp:Label ID="lblMMTP" runat="server" Text='<%# Eval("MassaMagraTotPerc", "{0:P1}") %>' />
<br />
<asp:Label ID="lblMMT" runat="server" Text='<%# Eval("MassaMagraTot", "{0:N1} kg") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="MassaMagraTot" HeaderText="M.Magra" ReadOnly="True" SortExpression="MassaMagraTot" DataFormatString="{0:N1} Kg" />
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
+1 -9
View File
@@ -7,28 +7,20 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<uc1:mod_ElencoVisitePaziente runat="server" ID="ElencoVisite" />
<br />
Navigazione dettagli
<br />
<div data-role="navbar">
<ul>
<li><a class="ui-btn ui-shadow ui-corner-all ui-icon-gear ui-btn-icon-left" href="VGen">Generale</a></li>
<li><a class="ui-btn ui-shadow ui-corner-all ui-icon-gear ui-btn-icon-left" href="VCiclo">CicloErgom</a></li>
<li><a class="ui-btn ui-shadow ui-corner-all ui-icon-gear ui-btn-icon-left" href="VEco">Cardio</a></li>
<%--<li><a href="#">BioMecc</a></li>
<li><a href="#">Laboratorio</a></li>
<li><a href="#">Psico</a></li>--%>
</ul>
</div>
<div data-role="navbar">
<ul>
<%--<li><a href="#">Generale</a></li>
<li><a href="#">CicloErgom</a></li>
<li><a href="#">Cardio</a></li>--%>
<li><a class="ui-btn ui-shadow ui-corner-all ui-icon-gear ui-btn-icon-left" href="VBMec">BioMecc</a></li>
<li><a class="ui-btn ui-shadow ui-corner-all ui-icon-gear ui-btn-icon-left" href="VLab">Laboratorio</a></li>
<li><a class="ui-btn ui-shadow ui-corner-all ui-icon-gear ui-btn-icon-left" href="VPsi">Psico</a></li>
</ul>
</div>
</asp:Content>
+248 -1
View File
@@ -2865,13 +2865,54 @@ SELECT IdxPaziente, DataVisita, Peso, Altezza, BMI, CirconfVita, GrassoTotPerc,
[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[1];
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 IdxPaziente, DataVisita, Peso, Altezza, BMI, CirconfVita, GrassoTotPerc, G" +
"rassoTot, GrassoViscPerc, GrassoVisc, GrassoViscTot, MassaMagraTotPerc, MassaMag" +
"raTot FROM dbo.VisGen";
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_VGen_DeteleQuery";
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("@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[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "dbo.stp_VGen_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[3] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[3].Connection = this.Connection;
this._commandCollection[3].CommandText = "dbo.stp_VGen_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("@Peso", 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("@Altezza", 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("@CirconfVita", 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("@GrassoTotPerc", 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("@GrassoViscPerc", 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("@MassaMagraTotPerc", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 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_VGen_UpdateQuery";
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("@Peso", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Altezza", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CirconfVita", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GrassoTotPerc", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GrassoViscPerc", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MassaMagraTotPerc", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].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[4].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, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -2898,6 +2939,23 @@ SELECT IdxPaziente, DataVisita, Peso, Altezza, BMI, CirconfVita, GrassoTotPerc,
return dataTable;
}
[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")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_Applicazione.VisGenDataTable getByPaziente(global::System.Nullable<int> IdxPaziente) {
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;
}
DS_Applicazione.VisGenDataTable dataTable = new DS_Applicazione.VisGenDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[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")]
@@ -3079,6 +3137,195 @@ SELECT IdxPaziente, DataVisita, Peso, Altezza, BMI, CirconfVita, GrassoTotPerc,
double Original_MassaMagraTot) {
return this.Update(Original_IdxPaziente, Original_DataVisita, Peso, Altezza, CirconfVita, GrassoTotPerc, GrassoViscPerc, MassaMagraTotPerc, Original_IdxPaziente, Original_DataVisita, Original_Peso, Original_Altezza, Original_BMI, Original_CirconfVita, Original_GrassoTotPerc, Original_GrassoTot, Original_GrassoViscPerc, Original_GrassoVisc, Original_GrassoViscTot, Original_MassaMagraTotPerc, Original_MassaMagraTot);
}
[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")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)]
public virtual int DeteleQuery(global::System.Nullable<int> Original_IdxPaziente, global::System.Nullable<global::System.DateTime> Original_DataVisita) {
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;
}
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", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, false)]
public virtual int InsertQuery(global::System.Nullable<int> IdxPaziente, global::System.Nullable<global::System.DateTime> DataVisita, global::System.Nullable<double> Peso, global::System.Nullable<double> Altezza, global::System.Nullable<double> CirconfVita, global::System.Nullable<double> GrassoTotPerc, global::System.Nullable<double> GrassoViscPerc, global::System.Nullable<double> MassaMagraTotPerc) {
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 ((Peso.HasValue == true)) {
command.Parameters[3].Value = ((double)(Peso.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((Altezza.HasValue == true)) {
command.Parameters[4].Value = ((double)(Altezza.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
if ((CirconfVita.HasValue == true)) {
command.Parameters[5].Value = ((double)(CirconfVita.Value));
}
else {
command.Parameters[5].Value = global::System.DBNull.Value;
}
if ((GrassoTotPerc.HasValue == true)) {
command.Parameters[6].Value = ((double)(GrassoTotPerc.Value));
}
else {
command.Parameters[6].Value = global::System.DBNull.Value;
}
if ((GrassoViscPerc.HasValue == true)) {
command.Parameters[7].Value = ((double)(GrassoViscPerc.Value));
}
else {
command.Parameters[7].Value = global::System.DBNull.Value;
}
if ((MassaMagraTotPerc.HasValue == true)) {
command.Parameters[8].Value = ((double)(MassaMagraTotPerc.Value));
}
else {
command.Parameters[8].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;
}
[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")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)]
public virtual int UpdateQuery(global::System.Nullable<int> IdxPaziente, global::System.Nullable<global::System.DateTime> DataVisita, global::System.Nullable<double> Peso, global::System.Nullable<double> Altezza, global::System.Nullable<double> CirconfVita, global::System.Nullable<double> GrassoTotPerc, global::System.Nullable<double> GrassoViscPerc, global::System.Nullable<double> MassaMagraTotPerc, global::System.Nullable<global::System.DateTime> Original_DataVisita, global::System.Nullable<int> Original_IdxPaziente) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
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 ((Peso.HasValue == true)) {
command.Parameters[3].Value = ((double)(Peso.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((Altezza.HasValue == true)) {
command.Parameters[4].Value = ((double)(Altezza.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
if ((CirconfVita.HasValue == true)) {
command.Parameters[5].Value = ((double)(CirconfVita.Value));
}
else {
command.Parameters[5].Value = global::System.DBNull.Value;
}
if ((GrassoTotPerc.HasValue == true)) {
command.Parameters[6].Value = ((double)(GrassoTotPerc.Value));
}
else {
command.Parameters[6].Value = global::System.DBNull.Value;
}
if ((GrassoViscPerc.HasValue == true)) {
command.Parameters[7].Value = ((double)(GrassoViscPerc.Value));
}
else {
command.Parameters[7].Value = global::System.DBNull.Value;
}
if ((MassaMagraTotPerc.HasValue == true)) {
command.Parameters[8].Value = ((double)(MassaMagraTotPerc.Value));
}
else {
command.Parameters[8].Value = global::System.DBNull.Value;
}
if ((Original_DataVisita.HasValue == true)) {
command.Parameters[9].Value = ((System.DateTime)(Original_DataVisita.Value));
}
else {
command.Parameters[9].Value = global::System.DBNull.Value;
}
if ((Original_IdxPaziente.HasValue == true)) {
command.Parameters[10].Value = ((int)(Original_IdxPaziente.Value));
}
else {
command.Parameters[10].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>
+63 -1
View File
@@ -212,7 +212,69 @@ SELECT IdxPaziente, DataVisita, Peso, Altezza, BMI, CirconfVita, GrassoTotPerc,
<Mapping SourceColumn="MassaMagraTotPerc" DataSetColumn="MassaMagraTotPerc" />
<Mapping SourceColumn="MassaMagraTot" DataSetColumn="MassaMagraTot" />
</Mappings>
<Sources />
<Sources>
<DbSource ConnectionRef="MedPredConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="DeteleQuery" Modifier="Public" Name="DeteleQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="DeteleQuery">
<DeleteCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_VGen_DeteleQuery</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="@Original_IdxPaziente" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Original_DataVisita" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</DeleteCommand>
</DbSource>
<DbSource ConnectionRef="MedPredConnectionString (Settings)" DbObjectName="MedPred.dbo.stp_VGen_getByPaziente" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByPaziente" GetMethodModifier="Public" GetMethodName="getByPaziente" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByPaziente" UserSourceName="getByPaziente">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_VGen_getByPaziente</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="@IdxPaziente" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MedPredConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="InsertQuery" Modifier="Public" Name="InsertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="InsertQuery">
<InsertCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_VGen_InsertQuery</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="@IdxPaziente" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DataVisita" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Peso" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Altezza" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@CirconfVita" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@GrassoTotPerc" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@GrassoViscPerc" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@MassaMagraTotPerc" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
</DbSource>
<DbSource ConnectionRef="MedPredConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="UpdateQuery" Modifier="Public" Name="UpdateQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="UpdateQuery">
<UpdateCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_VGen_UpdateQuery</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="@IdxPaziente" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DataVisita" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Peso" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Altezza" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@CirconfVita" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@GrassoTotPerc" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@GrassoViscPerc" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@MassaMagraTotPerc" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Original_DataVisita" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPaziente" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</Sources>
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ElencoVisiteTableAdapter" GeneratorDataComponentClassName="ElencoVisiteTableAdapter" Name="ElencoVisite" UserDataComponentName="ElencoVisiteTableAdapter">
<MainSource>
+2 -2
View File
@@ -4,10 +4,10 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="82" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:AnagPazienti" ZOrder="4" X="698" Y="94" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:VisGen" ZOrder="3" X="1060" Y="56" Height="305" Width="184" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:VisGen" ZOrder="3" X="1060" Y="56" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ElencoVisite" ZOrder="1" X="67" Y="40" Height="210" Width="260" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
</Shapes>
<Connectors>