Modifiche struttura dati ed inserimento arrow x spostamento ordine su SCFM

This commit is contained in:
Samuele E. Locatelli
2015-11-27 18:20:55 +01:00
parent efac09035d
commit 8925d382db
16 changed files with 170 additions and 12 deletions
+2 -2
View File
@@ -48,7 +48,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DS_Applicazione1.Designer.cs">
<Compile Include="DS_Applicazione.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DS_Applicazione.xsd</DependentUpon>
@@ -75,7 +75,7 @@
<None Include="DS_Applicazione.xsd">
<SubType>Designer</SubType>
<Generator>MSDataSetGenerator</Generator>
<LastGenOutput>DS_Applicazione1.Designer.cs</LastGenOutput>
<LastGenOutput>DS_Applicazione.Designer.cs</LastGenOutput>
</None>
<None Include="DS_Applicazione.xss">
<DependentUpon>DS_Applicazione.xsd</DependentUpon>
@@ -4042,6 +4042,8 @@ namespace CMS_SC_Data {
private global::System.Data.DataColumn columnCodVisib;
private global::System.Data.DataColumn columnOrdinale;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public MisureDataTable() {
@@ -4243,6 +4245,14 @@ namespace CMS_SC_Data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn OrdinaleColumn {
get {
return this.columnOrdinale;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Browsable(false)]
@@ -4301,7 +4311,8 @@ namespace CMS_SC_Data {
double LIVal,
double LSVal,
string CodSchedaVersNum,
string CodVisib) {
string CodVisib,
int Ordinale) {
MisureRow rowMisureRow = ((MisureRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
IdxDossier,
@@ -4324,7 +4335,8 @@ namespace CMS_SC_Data {
LIVal,
LSVal,
CodSchedaVersNum,
CodVisib};
CodVisib,
Ordinale};
if ((parentAnagFasiRowByFK_IstanzeMisura_AnagFasi1 != null)) {
columnValuesArray[5] = parentAnagFasiRowByFK_IstanzeMisura_AnagFasi1[0];
}
@@ -4383,6 +4395,7 @@ namespace CMS_SC_Data {
this.columnLSVal = base.Columns["LSVal"];
this.columnCodSchedaVersNum = base.Columns["CodSchedaVersNum"];
this.columnCodVisib = base.Columns["CodVisib"];
this.columnOrdinale = base.Columns["Ordinale"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -4430,6 +4443,8 @@ namespace CMS_SC_Data {
base.Columns.Add(this.columnCodSchedaVersNum);
this.columnCodVisib = new global::System.Data.DataColumn("CodVisib", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnCodVisib);
this.columnOrdinale = new global::System.Data.DataColumn("Ordinale", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnOrdinale);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnIdxDossier,
this.columnCodScheda,
@@ -4465,6 +4480,7 @@ namespace CMS_SC_Data {
this.columnCodSchedaVersNum.MaxLength = 152;
this.columnCodVisib.AllowDBNull = false;
this.columnCodVisib.MaxLength = 50;
this.columnOrdinale.AllowDBNull = false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -7571,6 +7587,17 @@ namespace CMS_SC_Data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int Ordinale {
get {
return ((int)(this[this.tableMisure.OrdinaleColumn]));
}
set {
this[this.tableMisure.OrdinaleColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public AnagFasiRow AnagFasiRow {
@@ -13445,8 +13472,9 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordin
tableMapping.ColumnMappings.Add("MaxPar", "MaxPar");
tableMapping.ColumnMappings.Add("LIVal", "LIVal");
tableMapping.ColumnMappings.Add("LSVal", "LSVal");
tableMapping.ColumnMappings.Add("CodSchedaVersNum", "CodSchedaVersNum");
tableMapping.ColumnMappings.Add("CodVisib", "CodVisib");
tableMapping.ColumnMappings.Add("Codschedaversnum", "Codschedaversnum");
tableMapping.ColumnMappings.Add("Ordinale", "Ordinale");
this._adapter.TableMappings.Add(tableMapping);
}
@@ -13463,7 +13491,9 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordin
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_Misure";
this._commandCollection[0].CommandText = "SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOr" +
"a, ValorePar, ValoreMis, OkValMis, CodDeroga, NomeMisura, TipoValMisura, NomePar" +
", MinPar, MaxPar, LIVal, LSVal, CodVisib, Ordinale FROM v_Misure";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
+4 -3
View File
@@ -992,8 +992,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordin
<DbSource ConnectionRef="CMS_SCConnectionString (Settings)" DbObjectName="[CMS-SC].dbo.v_Misure" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT *
FROM v_Misure</CommandText>
<CommandText>SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga, NomeMisura, TipoValMisura, NomePar, MinPar, MaxPar, LIVal, LSVal, CodVisib, Ordinale FROM v_Misure</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
@@ -1019,8 +1018,9 @@ FROM v_Misure</CommandText>
<Mapping SourceColumn="MaxPar" DataSetColumn="MaxPar" />
<Mapping SourceColumn="LIVal" DataSetColumn="LIVal" />
<Mapping SourceColumn="LSVal" DataSetColumn="LSVal" />
<Mapping SourceColumn="CodSchedaVersNum" DataSetColumn="CodSchedaVersNum" />
<Mapping SourceColumn="CodVisib" DataSetColumn="CodVisib" />
<Mapping SourceColumn="Codschedaversnum" DataSetColumn="Codschedaversnum" />
<Mapping SourceColumn="Ordinale" DataSetColumn="Ordinale" />
</Mappings>
<Sources>
<DbSource ConnectionRef="CMS_SCConnectionString (Settings)" DbObjectName="[CMS-SC].dbo.stp_Mis_Deroga" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="deroga" Modifier="Public" Name="deroga" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="deroga">
@@ -1838,6 +1838,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Ordinale" msprop:Generator_ColumnVarNameInTable="columnOrdinale" msprop:Generator_ColumnPropNameInRow="Ordinale" msprop:Generator_ColumnPropNameInTable="OrdinaleColumn" msprop:Generator_UserColumnName="Ordinale" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
Binary file not shown.
@@ -4,7 +4,7 @@
</configSections>
<connectionStrings>
<add name="CMS_SC_Data.Properties.Settings.CMS_SCConnectionString"
connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=CMS-SC;Persist Security Info=True;User ID=sa;Password=keyhammer"
connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=CMS-SC;Persist Security Info=True;User ID=sa;Password=keyhammer;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
Binary file not shown.
Binary file not shown.
+1
View File
@@ -865,6 +865,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="sql\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SteamWareLibrary\SteamWare\SteamWare.csproj">
@@ -16,7 +16,7 @@ namespace CMS_SC.WebUserControls
/// </summary>
public event EventHandler eh_selezioneValore;
/// <summary>
/// richeista SAVE (da enter)
/// richiesta SAVE (da enter)
/// </summary>
public event EventHandler eh_reqSave;
/// <summary>
@@ -36,6 +36,21 @@
<asp:Label ID="Label2" runat="server" Text='<%# Eval("CodSchedaVers") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" ItemStyle-Width="80px">
<HeaderTemplate>
<%# traduci("moveMis") %>
</HeaderTemplate>
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<div class="col-xs-6">
<asp:LinkButton ID="lbMoveUp" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="moveUp" OnClick="lb_Click" ToolTip="Move Up" CssClass="fa fa-arrow-up fa-2x" Visible='<%# arrowVisible("UP", Eval("CodFam"), Eval("CodSchedaVers")) %>' />
</div>
<div class="col-xs-6">
<asp:LinkButton ID="lbMoveDown" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="moveDown" OnClick="lb_Click" ToolTip="Move Down" CssClass="fa fa-arrow-down fa-2x" Visible='<%# arrowVisible("DOWN", Eval("CodFam"), Eval("CodSchedaVers")) %>' />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="opz" HeaderText="opz" SortExpression="opz" ControlStyle-Width="4em" />
<asp:BoundField DataField="NumSchede" HeaderText="#" SortExpression="NumSchede" />
<asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" ControlStyle-Width="100%" />
@@ -10,7 +10,34 @@ using SteamWare;
namespace CMS_SC.WebUserControls
{
public partial class mod_SchemaCollFamMacc : SteamWare.UserControl
{
{/// <summary>
/// selezione valore in DettScheda
/// </summary>
public event EventHandler eh_selezioneValore;
/// <summary>
/// richiesta SAVE (da enter)
/// </summary>
public event EventHandler eh_reqSave;
/// <summary>
/// sollevo evento selezione
/// </summary>
protected void raiseEvent()
{
// sollevo evento nuovo valore...
if (eh_selezioneValore != null)
{
eh_selezioneValore(this, new EventArgs());
}
}
/// <summary>
/// resetto selezione
/// </summary>
private void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
raiseEvent();
}
protected void Page_Load(object sender, EventArgs e)
{
}
@@ -61,5 +88,89 @@ namespace CMS_SC.WebUserControls
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
}
/// <summary>
/// selezionato valore
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// verifico se ho un argomento di tipo moveUp / moveDown... quale comando?
string _comando = "";
if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand"))
{
_comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand");
SteamWare.memLayer.ML.emptySessionVal("nextObjCommand");
}
if (_comando != "")
{
#if false
// SE c'era comando eseguo move...
switch (_comando)
{
case "moveUp":
case "moveDown":
DtProxy.man.taDS.moveUpDown(_comando, CodSchedaSel, VersSel, CodMisuraSel);
break;
case "clone":
DtProxy.man.taDS.clone(memLayer.ML.QSS("CodSchedaVers"), grView.SelectedDataKey["CodMisura"].ToString());
break;
default:
break;
}
#endif
resetSelezione();
}
else
{
raiseEvent();
}
}
/// <summary>
/// salvo in session il prox comando
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lb_Click(object sender, EventArgs e)
{
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument);
}
/// <summary>
/// determina visibilità frecce spostamento
/// </summary>
/// <param name="direction">direzione: UP / DOWN</param>
/// <param name="_CodFam">CodFam da verificare</param>
/// <param name="_CodSchedaVers">CodSchedaVers da verificare</param>
/// <returns></returns>
public bool arrowVisible(object _direction, object _CodFam, object _CodSchedaVers)
{
bool answ = false;
string direction = _direction.ToString();
string CodFam = _CodFam.ToString();
string CodSchedaVers = _CodSchedaVers.ToString();
if (memLayer.ML.BoolSessionObj("filtByFamMac"))
{
answ = true;
#if false
// recupero TUTTE le righe della scheda dett corrente
DS_Applicazione.DettSchedaDataTable tab = DtProxy.man.taDS.getByScheda(memLayer.ML.QSS("CodSchedaVers"));
// a seconda della direzione CERCO se ci siano misure prima/dopo...
string where = "";
switch (direction)
{
case "UP":
where = string.Format("CodSchedaVers < '{0}'", CodSchedaVers);
break;
case "DOWN":
where = string.Format("CodSchedaVers > '{0}'", CodSchedaVers);
break;
default:
break;
}
answ = tab.Select(where).Length > 0;
#endif
}
return answ;
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.