Crea celle, ancora qualche errore

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@53 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-05-18 11:08:19 +00:00
parent b6636917ba
commit cae5fb9f9f
21 changed files with 411 additions and 37 deletions
+16 -10
View File
@@ -1,11 +1,12 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagBlocchi.ascx.cs" Inherits="GMW.WebUserControls.mod_anagBlocchi" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagBlocchi.ascx.cs"
Inherits="GMW.WebUserControls.mod_anagBlocchi" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<div class="filtro_1">
<asp:Label ID="lblTitolo" runat="server" />
</div>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
DataKeyNames="IdxBlocco" DataSourceID="ods">
OnRowUpdating="grView_RowUpdating" DataKeyNames="IdxBlocco" DataSourceID="ods">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
@@ -26,11 +27,18 @@
Visible="false" />
</HeaderTemplate>
<ItemTemplate>
<%-- <asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
<%--
&nbsp;--%>
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCreaChild" runat="server" CausesValidation="False" ToolTip='<%# traduci("creaCelleMancanti") %>'
ImageUrl="~/images/createChildObj.png" CommandArgument="creaChildObj" CommandName="Update"
OnClick="imgCreaChild_Click" Visible='<%# childObjNeeded(Eval("IdxBlocco")) %>' />
<asp:ImageButton ID="imgShowDetail" runat="server" CausesValidation="False" CommandName="Select"
ToolTip='<%# traduci("MostraCelleBlocco") %>' ImageUrl="~/images/ShowDetail.png" />
<cc1:ConfirmButtonExtender ID="cbeCreaMancanti" runat="server" ConfirmText='<%# traduci("ConfermaCreaCelleMancantiBlocco")%>'
TargetControlID="imgCreaChild">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
@@ -101,15 +109,14 @@
<asp:TextBox ID="txtNumZ" runat="server" Text='<%# Bind("NumZ") %>' Width="3em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
CommandArgument='<%# Eval("IdxBlocco") %>' ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("IdxBlocco")) %>'
ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina , SteamWare.dimImg.small) %>' />
CommandArgument='<%# Eval("IdxBlocco") %>' ToolTip='<%# traduci("Delete") %>'
Visible='<%# delEnabled(Eval("IdxBlocco")) %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina , SteamWare.dimImg.small) %>' />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
TargetControlID="imgDelete">
</cc1:ConfirmButtonExtender>
@@ -132,9 +139,8 @@
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getByCodMag" TypeName="GMW_data.DS_magazzinoTableAdapters.BlocchiTableAdapter"
OnInserting="recuperaFooter" OnInserted="ods_Updated"
OnUpdated="ods_Updated" DeleteMethod="DeleteQuery" InsertMethod="Insert"
UpdateMethod="UpdateQuery">
OnInserting="recuperaFooter" OnInserted="ods_Updated" OnUpdated="ods_Updated"
DeleteMethod="DeleteQuery" InsertMethod="Insert" UpdateMethod="UpdateQuery">
<DeleteParameters>
<asp:Parameter Name="Original_IdxBlocco" Type="Int32" />
</DeleteParameters>
@@ -1,5 +1,6 @@
using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using GMW_data;
@@ -323,6 +324,11 @@ namespace GMW.WebUserControls
/// <param name="e"></param>
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
// evento come nuovo...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
@@ -372,6 +378,86 @@ namespace GMW.WebUserControls
grView.DataBind();
}
/// <summary>
/// salvo in session che il prox comando è creare oggetti child...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgCreaChild_Click(object sender, ImageClickEventArgs e)
{
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "creaChildObj");
}
/// <summary>
/// in caso di aggiornamento verifico se sia salvato un comando clona...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// carico l'idx dell'oggetto
int _idxBlocco = Convert.ToInt32(e.Keys["IdxBlocco"]);
// quale comando?
string _comando = "";
if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand"))
{
_comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand");
SteamWare.memLayer.ML.emptySessionVal("nextObjCommand");
}
// verifico il tipo di richiesta (up/down level, clona o update normale
switch (_comando)
{
case "creaChildObj":
utils.obj.taSTP.stp_celleCreaMancantiBlocco(memLayer.ML.confReadString("CodCS"), _idxBlocco);
updateOdsDaFiltro();
grView.EditIndex = -1;
grView.DataBind();
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
// blocco update!
e.Cancel = true;
break;
//case "revObj":
// Mod_userLog1.comportamento = logControlMode.hideLog;
// TA_app.obj.taSP.sp_aumentaRevCiclo(_idxCiclo, user_brembo.UtSn.userNameAD);
// updateOdsDaFiltro();
// grView.DataBind();
// // blocco update!
// e.Cancel = true;
// // nuovo metodo batch di caricamento...
// GTD.FAO.accodaCaricamentoPdfSuDoc(_idxCiclo);
// break;
//case "mostraNote":
// // blocco update!
// e.Cancel = true;
// Mod_userLog1.filtroNote = string.Format("{0}#", _idxCiclo);
// Mod_userLog1.comportamento = logControlMode.showLog;
break;
default:
// faccio update!
break;
}
}
/// <summary>
/// verifica se sia necessario creare obj child
/// </summary>
/// <param name="idx"></param>
/// <returns></returns>
public bool childObjNeeded(object idx)
{
bool answ = false;
int idxBlocco = Convert.ToInt32(idx);
// conto disavanzo...
int? delta = 0;
utils.obj.taSTP.stp_ContaDeltaCelleBlocco(idxBlocco, ref delta);
if (!delta.HasValue) delta = 0;
if (delta > 0) answ = true;
return answ;
}
#endregion
}
}
+19 -14
View File
@@ -1,6 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_confMag.ascx.cs"
Inherits="GMW.WebUserControls.mod_confMag" %>
<table>
<table width="100%">
<tr>
<td colspan="2">
<div class="filtro_1">
<asp:Label ID="lblTotaleImpieghi" runat="server" />
</div>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblTotCelleDaTipo" runat="server" />
@@ -11,7 +18,7 @@
</b>
</td>
</tr>
<tr>
<tr>
<td>
<asp:Label ID="lblTotCelleDaBlocchi" runat="server" />
</td>
@@ -21,14 +28,12 @@
</b>
</td>
</tr>
</table>
<table>
<tr>
<td colspan="3">
<asp:Label ID="lblDettImpieghiBlocchi" runat="server" />
</td>
</tr>
<tr>
</table>
<div class="filtro_1">
<asp:Label ID="lblDettImpieghiBlocchi" runat="server" />
</div>
<table width="100%">
<tr align="center">
<td>
&nbsp;
</td>
@@ -39,8 +44,8 @@
<asp:Label ID="lblInattive" runat="server" />
</td>
</tr>
<tr>
<td>
<tr align="center">
<td align="right">
<asp:Label ID="lblAss" runat="server" />
</td>
<td>
@@ -54,8 +59,8 @@
</b>
</td>
</tr>
<tr>
<td>
<tr align="center">
<td align="right">
<asp:Label ID="lblNonAss" runat="server" />
</td>
<td>
+60 -5
View File
@@ -14,12 +14,22 @@ namespace GMW.WebUserControls
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
public void doUpdate()
{
bindControlli();
}
protected override void bindControlli()
{
fixLabels();
fixValues();
}
private void fixValues()
{
lblTotaleImpieghi.Text = traduci("lblTotaleImpieghi");
lblTotCelleDaTipo.Text = traduci("lblTotCelleDaTipo");
lblTotCelleDaBlocchi.Text = traduci("lblTotCelleDaBlocchi");
lblDettImpieghiBlocchi.Text = traduci("lblDettImpieghiBlocchi");
@@ -31,16 +41,61 @@ namespace GMW.WebUserControls
private void fixLabels()
{
showImpieghiTotali();
showImpieghiBlocco();
}
private void showImpieghiBlocco()
{
// calcolo valori: attive assegnate
int? celleAttiveAss = 0;
utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), true, 1, ref celleAttiveAss);
if (!celleAttiveAss.HasValue) celleAttiveAss = 0;
// calcolo valori: attive assegnate
int? celleAttiveNonAss = 0;
utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), true, 0, ref celleAttiveNonAss);
if (!celleAttiveNonAss.HasValue) celleAttiveNonAss = 0;
// calcolo valori: NON attive assegnate
int? celleNonAttiveAss = 0;
utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), false, 1, ref celleNonAttiveAss);
if (!celleNonAttiveAss.HasValue) celleNonAttiveAss = 0;
// calcolo valori: NONattive assegnate
int? celleNonAttiveNonAss = 0;
utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), false, 0, ref celleNonAttiveNonAss);
if (!celleNonAttiveNonAss.HasValue) celleNonAttiveNonAss = 0;
// altri valori
lblAssAtt.Text = celleAttiveAss.ToString();
lblAssInatt.Text = celleNonAttiveAss.ToString();
lblNonAssAtt.Text = celleAttiveNonAss.ToString();
lblNonAssInatt.Text = celleNonAttiveNonAss.ToString();
}
private void showImpieghiTotali()
{
// calcolo valori
int? totCelleTipo = 0;
utils.obj.taSTP.stp_ContaCelle4Tipo(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), ref totCelleTipo);
lblNumCelleDaTipo.Text = totCelleTipo.ToString();
if (!totCelleTipo.HasValue) totCelleTipo = 0;
int? totCelleBlocchi = 0;
utils.obj.taSTP.stp_ContaCelle4Blocchi(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), ref totCelleBlocchi);
if (!totCelleBlocchi.HasValue) totCelleBlocchi = 0;
// controllo cosa inserire nel check...
Style ctrlStyle = new Style();
if (totCelleBlocchi == totCelleTipo)
{
ctrlStyle.CssClass = "valOk";
}
else
{
ctrlStyle.CssClass = "valKo";
}
// applico style
lblNumCelleDaTipo.ApplyStyle(ctrlStyle);
lblNumCelleDaBlocchi.ApplyStyle(ctrlStyle);
// inserisco valori
lblNumCelleDaTipo.Text = totCelleTipo.ToString();
lblNumCelleDaBlocchi.Text = totCelleBlocchi.ToString();
lblAssAtt.Text = "0";
lblAssInatt.Text = "0";
lblNonAssAtt.Text = "0";
lblNonAssInatt.Text = "0";
}
}
}
+9
View File
@@ -13,6 +13,15 @@ namespace GMW.WebUserControls {
public partial class mod_confMag {
/// <summary>
/// lblTotaleImpieghi control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTotaleImpieghi;
/// <summary>
/// lblTotCelleDaTipo control.
/// </summary>
@@ -323,6 +323,11 @@ namespace GMW.WebUserControls
/// <param name="e"></param>
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
// evento come nuovo...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
+2 -2
View File
@@ -13,14 +13,14 @@
<td valign="top">
<uc1:mod_anagMagazzini ID="mod_anagMagazzini1" runat="server" />
<asp:Panel ID="pnlMagStat" runat="server" Visible="false">
<hr />
<br />
<uc2:mod_confMag ID="mod_confMag1" runat="server" />
</asp:Panel>
</td>
<td valign="top">
<asp:Panel ID="pnlMagConf" runat="server" Visible="false">
<uc3:mod_tipoCella ID="mod_tipoCella1" runat="server" />
<hr />
<br />
<uc4:mod_anagBlocchi ID="mod_anagBlocchi1" runat="server" />
</asp:Panel>
</td>
+15 -1
View File
@@ -13,6 +13,18 @@ namespace GMW
{
mod_anagMagazzini1.eh_selValore += new EventHandler(mod_anagMagazzini1_eh_selValore);
mod_anagMagazzini1.eh_resetSelezione += new EventHandler(mod_anagMagazzini1_eh_resetSelezione);
mod_anagBlocchi1.eh_nuovoValore += new EventHandler(mod_anagBlocchi1_eh_nuovoValore);
mod_tipoCella1.eh_nuovoValore += new EventHandler(mod_tipoCella1_eh_nuovoValore);
}
void mod_tipoCella1_eh_nuovoValore(object sender, EventArgs e)
{
mod_confMag1.doUpdate();
}
void mod_anagBlocchi1_eh_nuovoValore(object sender, EventArgs e)
{
mod_confMag1.doUpdate();
}
void mod_anagMagazzini1_eh_resetSelezione(object sender, EventArgs e)
@@ -24,9 +36,11 @@ namespace GMW
void mod_anagMagazzini1_eh_selValore(object sender, EventArgs e)
{
// mostro i 3 moduli aggiuntivi!
// mostro i moduli aggiuntivi!
pnlMagStat.Visible = true;
pnlMagConf.Visible = true;
// chiamo update esplicito calcoli
mod_confMag1.doUpdate();
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.
Binary file not shown.
+156 -1
View File
@@ -820,7 +820,7 @@ namespace GMW_data.DS_UtilityTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.IDbCommand[2];
this._commandCollection = new global::System.Data.IDbCommand[5];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[0])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString);
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[0])).CommandText = "dbo.stp_ContaCelle4Tipo";
@@ -837,6 +837,30 @@ namespace GMW_data.DS_UtilityTableAdapters {
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotCelle", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString);
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandText = "dbo.stp_ContaCelleBlocco";
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandType = global::System.Data.CommandType.StoredProcedure;
((global::System.Data.SqlClient.SqlCommand)(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, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FiltAttive", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PosAssegnata", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotCelle", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString);
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).CommandText = "dbo.stp_ContaDeltaCelleBlocco";
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).CommandType = global::System.Data.CommandType.StoredProcedure;
((global::System.Data.SqlClient.SqlCommand)(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, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DeltaCelle", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand();
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString);
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).CommandText = "dbo.stp_celleCreaMancantiBlocco";
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).CommandType = global::System.Data.CommandType.StoredProcedure;
((global::System.Data.SqlClient.SqlCommand)(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, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", 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()]
@@ -930,6 +954,137 @@ namespace GMW_data.DS_UtilityTableAdapters {
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_ContaCelleBlocco(string CodCS, string CodMag, global::System.Nullable<bool> FiltAttive, global::System.Nullable<int> PosAssegnata, ref global::System.Nullable<int> TotCelle) {
global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[2]));
if ((CodCS == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(CodCS));
}
if ((CodMag == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
else {
command.Parameters[2].Value = ((string)(CodMag));
}
if ((FiltAttive.HasValue == true)) {
command.Parameters[3].Value = ((bool)(FiltAttive.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((PosAssegnata.HasValue == true)) {
command.Parameters[4].Value = ((int)(PosAssegnata.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
if ((TotCelle.HasValue == true)) {
command.Parameters[5].Value = ((int)(TotCelle.Value));
}
else {
command.Parameters[5].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();
}
}
if (((command.Parameters[5].Value == null)
|| (command.Parameters[5].Value.GetType() == typeof(global::System.DBNull)))) {
TotCelle = new global::System.Nullable<int>();
}
else {
TotCelle = new global::System.Nullable<int>(((int)(command.Parameters[5].Value)));
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_ContaDeltaCelleBlocco(global::System.Nullable<int> IdxBlocco, ref global::System.Nullable<int> DeltaCelle) {
global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[3]));
if ((IdxBlocco.HasValue == true)) {
command.Parameters[1].Value = ((int)(IdxBlocco.Value));
}
else {
command.Parameters[1].Value = global::System.DBNull.Value;
}
if ((DeltaCelle.HasValue == true)) {
command.Parameters[2].Value = ((int)(DeltaCelle.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();
}
}
if (((command.Parameters[2].Value == null)
|| (command.Parameters[2].Value.GetType() == typeof(global::System.DBNull)))) {
DeltaCelle = new global::System.Nullable<int>();
}
else {
DeltaCelle = new global::System.Nullable<int>(((int)(command.Parameters[2].Value)));
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_celleCreaMancantiBlocco(string CodCS, global::System.Nullable<int> IdxBlocco) {
global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[4]));
if ((CodCS == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(CodCS));
}
if ((IdxBlocco.HasValue == true)) {
command.Parameters[2].Value = ((int)(IdxBlocco.Value));
}
else {
command.Parameters[2].Value = global::System.DBNull.Value;
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
}
/// <summary>
+42 -3
View File
@@ -67,6 +67,45 @@ ORDER BY label</CommandText>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_ContaCelleBlocco" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_ContaCelleBlocco" MethodsParameterType="CLR" Modifier="Public" Name="stp_ContaCelleBlocco" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="stp_ContaCelleBlocco">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ContaCelleBlocco</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@CodCS" Precision="0" ProviderType="VarChar" Scale="0" Size="2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@CodMag" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@FiltAttive" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PosAssegnata" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="InputOutput" ParameterName="@TotCelle" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_ContaDeltaCelleBlocco" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_ContaDeltaCelleBlocco" MethodsParameterType="CLR" Modifier="Public" Name="stp_ContaDeltaCelleBlocco" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy3" UserSourceName="stp_ContaDeltaCelleBlocco">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ContaDeltaCelleBlocco</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="@IdxBlocco" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="InputOutput" ParameterName="@DeltaCelle" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_celleCreaMancantiBlocco" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_celleCreaMancantiBlocco" MethodsParameterType="CLR" Modifier="Public" Name="stp_celleCreaMancantiBlocco" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy4" UserSourceName="stp_celleCreaMancantiBlocco">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_celleCreaMancantiBlocco</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@CodCS" Precision="0" ProviderType="VarChar" Scale="0" Size="2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@IdxBlocco" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources>
</DataSource>
</xs:appinfo>
@@ -77,21 +116,21 @@ ORDER BY label</CommandText>
<xs:element name="v_selMag" msprop:Generator_UserTableName="v_selMag" msprop:Generator_RowDeletedName="v_selMagRowDeleted" msprop:Generator_RowChangedName="v_selMagRowChanged" msprop:Generator_RowClassName="v_selMagRow" msprop:Generator_RowChangingName="v_selMagRowChanging" msprop:Generator_RowEvArgName="v_selMagRowChangeEvent" msprop:Generator_RowEvHandlerName="v_selMagRowChangeEventHandler" msprop:Generator_TableClassName="v_selMagDataTable" msprop:Generator_TableVarName="tablev_selMag" msprop:Generator_RowDeletingName="v_selMagRowDeleting" msprop:Generator_TablePropName="v_selMag">
<xs:complexType>
<xs:sequence>
<xs:element name="value" msprop:Generator_UserColumnName="value" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn">
<xs:element name="value" msprop:Generator_UserColumnName="value" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInTable="valueColumn">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="label" msprop:Generator_UserColumnName="label" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" minOccurs="0">
<xs:element name="label" msprop:Generator_UserColumnName="label" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_ColumnPropNameInTable="labelColumn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="conditio" msprop:Generator_UserColumnName="conditio" msprop:Generator_ColumnVarNameInTable="columnconditio" msprop:Generator_ColumnPropNameInRow="conditio" msprop:Generator_ColumnPropNameInTable="conditioColumn">
<xs:element name="conditio" msprop:Generator_UserColumnName="conditio" msprop:Generator_ColumnPropNameInRow="conditio" msprop:Generator_ColumnVarNameInTable="columnconditio" msprop:Generator_ColumnPropNameInTable="conditioColumn">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2" />
+1 -1
View File
@@ -7,7 +7,7 @@
<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">
<Shapes>
<Shape ID="DesignTable:v_selMag" ZOrder="2" X="113" Y="114" Height="153" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignSources:STP" ZOrder="1" X="227" Y="449" Height="67" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="44" />
<Shape ID="DesignSources:STP" ZOrder="1" X="227" Y="449" Height="124" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="101" />
</Shapes>
<Connectors />
</DiagramLayout>
Binary file not shown.
Binary file not shown.
Binary file not shown.