completata gestione email ai CC
This commit is contained in:
Samuele Locatelli
2013-09-17 17:20:42 +02:00
parent aef01d7158
commit f1a9e0c8e4
10 changed files with 178 additions and 58 deletions
+46 -23
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.33440
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -8234,7 +8234,7 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
[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[6];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EM" +
@@ -8242,37 +8242,43 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
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 = "SELECT ATTIVO, COD_CDC, COD_LINGUA, COD_SOCIETA, COGNOME, DOMINIO, EMAIL, MATRICO" +
"LA, NOME, SIGLA, USER_NAME FROM UTENTE WHERE (MATRICOLA = @MATRICOLA)";
this._commandCollection[1].CommandText = "SELECT *\r\nFROM UTENTE \r\nWHERE (COGNOME + \' \' + NOME) = @ricerca OR (NOME + \' \' + " +
"COGNOME = @ricerca)";
this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MATRICOLA", global::System.Data.SqlDbType.VarChar, 5, global::System.Data.ParameterDirection.Input, 0, 0, "MATRICOLA", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ricerca", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", 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 = "SELECT ATTIVO, COD_CDC, COD_LINGUA, COD_SOCIETA, COGNOME, DOMINIO, EMAIL, MATRICO" +
"LA, NOME, SIGLA, USER_NAME FROM UTENTE WHERE (NOME LIKE \'%\' + @ricerca + \'%\') OR" +
" (COGNOME LIKE \'%\' + @ricerca + \'%\')";
"LA, NOME, SIGLA, USER_NAME FROM UTENTE WHERE (MATRICOLA = @MATRICOLA)";
this._commandCollection[2].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ricerca", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "NOME", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MATRICOLA", global::System.Data.SqlDbType.VarChar, 5, global::System.Data.ParameterDirection.Input, 0, 0, "MATRICOLA", 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 = "SELECT ATTIVO, COD_CDC, COD_LINGUA, COD_SOCIETA, COGNOME, DOMINIO, EMAIL, MATRICO" +
"LA, NOME, SIGLA, USER_NAME FROM UTENTE WHERE (USER_NAME = @USER_NAME)";
"LA, NOME, SIGLA, USER_NAME FROM UTENTE WHERE (NOME LIKE \'%\' + @ricerca + \'%\') OR" +
" (COGNOME LIKE \'%\' + @ricerca + \'%\')";
this._commandCollection[3].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@USER_NAME", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "USER_NAME", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ricerca", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "NOME", 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 = "SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC," +
" EMAIL, SIGLA, COD_LINGUA, ATTIVO\r\nFROM UTENTE\r\n\r\nWHERE (USER_NAME = " +
"@username) AND (DOMINIO = @dominio)";
this._commandCollection[4].CommandText = "SELECT ATTIVO, COD_CDC, COD_LINGUA, COD_SOCIETA, COGNOME, DOMINIO, EMAIL, MATRICO" +
"LA, NOME, SIGLA, USER_NAME FROM UTENTE WHERE (USER_NAME = @USER_NAME)";
this._commandCollection[4].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "USER_NAME", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dominio", global::System.Data.SqlDbType.VarChar, 30, global::System.Data.ParameterDirection.Input, 0, 0, "DOMINIO", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@USER_NAME", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "USER_NAME", 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 = @"SELECT UTENTE.ATTIVO, UTENTE.COD_CDC, UTENTE.COD_LINGUA, UTENTE.COD_SOCIETA, UTENTE.COGNOME, UTENTE.DOMINIO, UTENTE.EMAIL, UTENTE.MATRICOLA, UTENTE.NOME, UTENTE.SIGLA, UTENTE.USER_NAME FROM UTENTE INNER JOIN DIRITTI ON UTENTE.USER_NAME = DIRITTI.USER_NAME WHERE (DIRITTI.COD_MODULO = @COD_MODULO) AND (DIRITTI.COD_FUNZIONE = @COD_FUNZIONE)";
this._commandCollection[5].CommandText = "SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC," +
" EMAIL, SIGLA, COD_LINGUA, ATTIVO\r\nFROM UTENTE\r\n\r\nWHERE (USER_NAME = " +
"@username) AND (DOMINIO = @dominio)";
this._commandCollection[5].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@COD_MODULO", global::System.Data.SqlDbType.NVarChar, 31, global::System.Data.ParameterDirection.Input, 0, 0, "COD_MODULO", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@COD_FUNZIONE", global::System.Data.SqlDbType.NVarChar, 31, global::System.Data.ParameterDirection.Input, 0, 0, "COD_FUNZIONE", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "USER_NAME", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dominio", global::System.Data.SqlDbType.VarChar, 30, global::System.Data.ParameterDirection.Input, 0, 0, "DOMINIO", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[6].Connection = this.Connection;
this._commandCollection[6].CommandText = @"SELECT UTENTE.ATTIVO, UTENTE.COD_CDC, UTENTE.COD_LINGUA, UTENTE.COD_SOCIETA, UTENTE.COGNOME, UTENTE.DOMINIO, UTENTE.EMAIL, UTENTE.MATRICOLA, UTENTE.NOME, UTENTE.SIGLA, UTENTE.USER_NAME FROM UTENTE INNER JOIN DIRITTI ON UTENTE.USER_NAME = DIRITTI.USER_NAME WHERE (DIRITTI.COD_MODULO = @COD_MODULO) AND (DIRITTI.COD_FUNZIONE = @COD_FUNZIONE)";
this._commandCollection[6].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@COD_MODULO", global::System.Data.SqlDbType.NVarChar, 31, global::System.Data.ParameterDirection.Input, 0, 0, "COD_MODULO", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@COD_FUNZIONE", global::System.Data.SqlDbType.NVarChar, 31, global::System.Data.ParameterDirection.Input, 0, 0, "COD_FUNZIONE", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -8303,8 +8309,25 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
[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 DataLayer_AnagGen.UTENTEDataTable getByMatricola(string MATRICOLA) {
public virtual DataLayer_AnagGen.UTENTEDataTable getByCognomeNome(string ricerca) {
this.Adapter.SelectCommand = this.CommandCollection[1];
if ((ricerca == null)) {
throw new global::System.ArgumentNullException("ricerca");
}
else {
this.Adapter.SelectCommand.Parameters[0].Value = ((string)(ricerca));
}
DataLayer_AnagGen.UTENTEDataTable dataTable = new DataLayer_AnagGen.UTENTEDataTable();
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")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DataLayer_AnagGen.UTENTEDataTable getByMatricola(string MATRICOLA) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((MATRICOLA == null)) {
this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
}
@@ -8321,7 +8344,7 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DataLayer_AnagGen.UTENTEDataTable getByRicercaNomeCognome(string ricerca) {
this.Adapter.SelectCommand = this.CommandCollection[2];
this.Adapter.SelectCommand = this.CommandCollection[3];
if ((ricerca == null)) {
this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
}
@@ -8338,7 +8361,7 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DataLayer_AnagGen.UTENTEDataTable getByUserName(string USER_NAME) {
this.Adapter.SelectCommand = this.CommandCollection[3];
this.Adapter.SelectCommand = this.CommandCollection[4];
if ((USER_NAME == null)) {
throw new global::System.ArgumentNullException("USER_NAME");
}
@@ -8355,7 +8378,7 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DataLayer_AnagGen.UTENTEDataTable GetDataByUtenteDominio(string username, string dominio) {
this.Adapter.SelectCommand = this.CommandCollection[4];
this.Adapter.SelectCommand = this.CommandCollection[5];
if ((username == null)) {
throw new global::System.ArgumentNullException("username");
}
@@ -8378,7 +8401,7 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DataLayer_AnagGen.UTENTEDataTable getElencoByDiritti(string COD_MODULO, string COD_FUNZIONE) {
this.Adapter.SelectCommand = this.CommandCollection[5];
this.Adapter.SelectCommand = this.CommandCollection[6];
if ((COD_MODULO == null)) {
throw new global::System.ArgumentNullException("COD_MODULO");
}
+22 -10
View File
@@ -4,9 +4,9 @@
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="2" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="Flamma_AnagraficaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="Flamma_AnagraficaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ETS_Data.Properties.Settings.GlobalReference.Default.Flamma_AnagraficaConnectionString" Provider="System.Data.SqlClient" />
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="Flamma_AnagraficaConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="Flamma_AnagraficaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ETS_Data.Properties.Settings.GlobalReference.Default.Flamma_AnagraficaConnectionString" Provider="System.Data.SqlClient" />
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ETS_AnagraficaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="ETS_AnagraficaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ETS_Data.Properties.Settings.GlobalReference.Default.ETS_AnagraficaConnectionString" Provider="System.Data.SqlClient" />
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ETS_AnagraficaConnectionString1" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="ETS_AnagraficaConnectionString1 (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ETS_Data.Properties.Settings.GlobalReference.Default.ETS_AnagraficaConnectionString1" Provider="System.Data.SqlClient" />
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ETS_AnagraficaConnectionString1" IsAppSettingsProperty="true" Modifier="Assembly" Name="ETS_AnagraficaConnectionString1 (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ETS_Data.Properties.Settings.GlobalReference.Default.ETS_AnagraficaConnectionString1" Provider="System.Data.SqlClient" />
</Connections>
<Tables>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CDCTableAdapter" GeneratorDataComponentClassName="CDCTableAdapter" Name="CDC" UserDataComponentName="CDCTableAdapter">
@@ -590,6 +590,18 @@ SELECT DOMINIO, USER_NAME, COGNOME, NOME, COD_SOCIETA, MATRICOLA, COD_CDC, EMAIL
<Mapping SourceColumn="DOMINIO" DataSetColumn="DOMINIO" />
</Mappings>
<Sources>
<DbSource ConnectionRef="ETS_AnagraficaConnectionString (Settings)" DbObjectName="ETS_Anagrafica.dbo.UTENTE" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByCognomeNome" GetMethodModifier="Public" GetMethodName="getByCognomeNome" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByCognomeNome" UserSourceName="getByCognomeNome">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT *
FROM UTENTE
WHERE (COGNOME + ' ' + NOME) = @ricerca OR (NOME + ' ' + COGNOME = @ricerca)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="ricerca" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@ricerca" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="ETS_AnagraficaConnectionString (Settings)" DbObjectName="SteamWare_Anagrafica.dbo.UTENTE" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByMatricola" GetMethodModifier="Public" GetMethodName="getByMatricola" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByMatricola" UserSourceName="getByMatricola">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
@@ -1306,14 +1318,14 @@ WHERE (User_Name = @User_Name) AND (Passwd = @Passwd)</CommandText>
</xs:element>
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="FK_Permessi2Funzion_FUNZIONE" msdata:parent="FUNZIONE" msdata:child="Permessi2Funzione" msdata:parentkey="COD_FUNZIONE" msdata:childkey="COD_FUNZIONE" msprop:Generator_UserChildTable="Permessi2Funzione" msprop:Generator_ChildPropName="GetPermessi2FunzioneRows" msprop:Generator_UserRelationName="FK_Permessi2Funzion_FUNZIONE" msprop:Generator_RelationVarName="relationFK_Permessi2Funzion_FUNZIONE" msprop:Generator_UserParentTable="FUNZIONE" msprop:Generator_ParentPropName="FUNZIONERow" />
<msdata:Relationship name="FK_Permessi2Funzion_Permessi" msdata:parent="Permessi" msdata:child="Permessi2Funzione" msdata:parentkey="COD_PERMESSO" msdata:childkey="COD_PERMESSO" msprop:Generator_UserChildTable="Permessi2Funzione" msprop:Generator_ChildPropName="GetPermessi2FunzioneRows" msprop:Generator_UserRelationName="FK_Permessi2Funzion_Permessi" msprop:Generator_RelationVarName="relationFK_Permessi2Funzion_Permessi" msprop:Generator_UserParentTable="Permessi" msprop:Generator_ParentPropName="PermessiRow" />
<msdata:Relationship name="FK_DIRITTI_CDC1" msdata:parent="CDC" msdata:child="DIRITTI" msdata:parentkey="COD_CDC" msdata:childkey="COD_CDC" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_CDC1" msprop:Generator_RelationVarName="relationFK_DIRITTI_CDC1" msprop:Generator_UserParentTable="CDC" msprop:Generator_ParentPropName="CDCRow" />
<msdata:Relationship name="FK_DIRITTI_FUNZIONE" msdata:parent="FUNZIONE" msdata:child="DIRITTI" msdata:parentkey="COD_FUNZIONE" msdata:childkey="COD_FUNZIONE" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="_GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_FUNZIONE" msprop:Generator_RelationVarName="relationFK_DIRITTI_FUNZIONE" msprop:Generator_UserParentTable="FUNZIONE" msprop:Generator_ParentPropName="FUNZIONERow" />
<msdata:Relationship name="FK_DIRITTI_MODULO1" msdata:parent="MODULO" msdata:child="DIRITTI" msdata:parentkey="COD_MODULO" msdata:childkey="COD_MODULO" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="_GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_MODULO1" msprop:Generator_RelationVarName="relationFK_DIRITTI_MODULO1" msprop:Generator_UserParentTable="MODULO" msprop:Generator_ParentPropName="MODULORow" />
<msdata:Relationship name="FK_DIRITTI_UTENTE" msdata:parent="UTENTE" msdata:child="DIRITTI" msdata:parentkey="USER_NAME" msdata:childkey="USER_NAME" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_UTENTE" msprop:Generator_RelationVarName="relationFK_DIRITTI_UTENTE" msprop:Generator_UserParentTable="UTENTE" msprop:Generator_ParentPropName="UTENTERow" />
<msdata:Relationship name="FK_UTENTE_CDC" msdata:parent="CDC" msdata:child="UTENTE" msdata:parentkey="COD_CDC" msdata:childkey="COD_CDC" msprop:Generator_UserChildTable="UTENTE" msprop:Generator_ChildPropName="GetUTENTERows" msprop:Generator_UserRelationName="FK_UTENTE_CDC" msprop:Generator_RelationVarName="relationFK_UTENTE_CDC" msprop:Generator_UserParentTable="CDC" msprop:Generator_ParentPropName="CDCRow" />
<msdata:Relationship name="FK_UserDataExt_UserData" msdata:parent="UserData" msdata:child="UserDataExt" msdata:parentkey="User_Name" msdata:childkey="User_Name" msprop:Generator_UserChildTable="UserDataExt" msprop:Generator_ChildPropName="GetUserDataExtRows" msprop:Generator_UserRelationName="FK_UserDataExt_UserData" msprop:Generator_RelationVarName="relationFK_UserDataExt_UserData" msprop:Generator_UserParentTable="UserData" msprop:Generator_ParentPropName="UserDataRow" />
<msdata:Relationship name="FK_Permessi2Funzion_FUNZIONE" msdata:parent="FUNZIONE" msdata:child="Permessi2Funzione" msdata:parentkey="COD_FUNZIONE" msdata:childkey="COD_FUNZIONE" msprop:Generator_UserChildTable="Permessi2Funzione" msprop:Generator_ChildPropName="GetPermessi2FunzioneRows" msprop:Generator_UserRelationName="FK_Permessi2Funzion_FUNZIONE" msprop:Generator_ParentPropName="FUNZIONERow" msprop:Generator_RelationVarName="relationFK_Permessi2Funzion_FUNZIONE" msprop:Generator_UserParentTable="FUNZIONE" />
<msdata:Relationship name="FK_Permessi2Funzion_Permessi" msdata:parent="Permessi" msdata:child="Permessi2Funzione" msdata:parentkey="COD_PERMESSO" msdata:childkey="COD_PERMESSO" msprop:Generator_UserChildTable="Permessi2Funzione" msprop:Generator_ChildPropName="GetPermessi2FunzioneRows" msprop:Generator_UserRelationName="FK_Permessi2Funzion_Permessi" msprop:Generator_ParentPropName="PermessiRow" msprop:Generator_RelationVarName="relationFK_Permessi2Funzion_Permessi" msprop:Generator_UserParentTable="Permessi" />
<msdata:Relationship name="FK_DIRITTI_CDC1" msdata:parent="CDC" msdata:child="DIRITTI" msdata:parentkey="COD_CDC" msdata:childkey="COD_CDC" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_CDC1" msprop:Generator_ParentPropName="CDCRow" msprop:Generator_RelationVarName="relationFK_DIRITTI_CDC1" msprop:Generator_UserParentTable="CDC" />
<msdata:Relationship name="FK_DIRITTI_FUNZIONE" msdata:parent="FUNZIONE" msdata:child="DIRITTI" msdata:parentkey="COD_FUNZIONE" msdata:childkey="COD_FUNZIONE" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="_GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_FUNZIONE" msprop:Generator_ParentPropName="FUNZIONERow" msprop:Generator_RelationVarName="relationFK_DIRITTI_FUNZIONE" msprop:Generator_UserParentTable="FUNZIONE" />
<msdata:Relationship name="FK_DIRITTI_MODULO1" msdata:parent="MODULO" msdata:child="DIRITTI" msdata:parentkey="COD_MODULO" msdata:childkey="COD_MODULO" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="_GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_MODULO1" msprop:Generator_ParentPropName="MODULORow" msprop:Generator_RelationVarName="relationFK_DIRITTI_MODULO1" msprop:Generator_UserParentTable="MODULO" />
<msdata:Relationship name="FK_DIRITTI_UTENTE" msdata:parent="UTENTE" msdata:child="DIRITTI" msdata:parentkey="USER_NAME" msdata:childkey="USER_NAME" msprop:Generator_UserChildTable="DIRITTI" msprop:Generator_ChildPropName="GetDIRITTIRows" msprop:Generator_UserRelationName="FK_DIRITTI_UTENTE" msprop:Generator_ParentPropName="UTENTERow" msprop:Generator_RelationVarName="relationFK_DIRITTI_UTENTE" msprop:Generator_UserParentTable="UTENTE" />
<msdata:Relationship name="FK_UTENTE_CDC" msdata:parent="CDC" msdata:child="UTENTE" msdata:parentkey="COD_CDC" msdata:childkey="COD_CDC" msprop:Generator_UserChildTable="UTENTE" msprop:Generator_ChildPropName="GetUTENTERows" msprop:Generator_UserRelationName="FK_UTENTE_CDC" msprop:Generator_ParentPropName="CDCRow" msprop:Generator_RelationVarName="relationFK_UTENTE_CDC" msprop:Generator_UserParentTable="CDC" />
<msdata:Relationship name="FK_UserDataExt_UserData" msdata:parent="UserData" msdata:child="UserDataExt" msdata:parentkey="User_Name" msdata:childkey="User_Name" msprop:Generator_UserChildTable="UserDataExt" msprop:Generator_ChildPropName="GetUserDataExtRows" msprop:Generator_UserRelationName="FK_UserDataExt_UserData" msprop:Generator_ParentPropName="UserDataRow" msprop:Generator_RelationVarName="relationFK_UserDataExt_UserData" msprop:Generator_UserParentTable="UserData" />
</xs:appinfo>
</xs:annotation>
</xs:schema>
+20 -2
View File
@@ -806,7 +806,7 @@ namespace ETS_Data
return answ;
}
/// <summary>
/// restituisce cognome e nome di un utente dato username...
/// restituisce email di un utente dato username...
/// </summary>
/// <param name="userName">username</param>
/// <returns></returns>
@@ -824,7 +824,7 @@ namespace ETS_Data
return answ;
}
/// <summary>
/// restituisce cognome e nome di un utente dato username e dominio...
/// restituisce email di un utente dato username e dominio...
/// </summary>
/// <param name="userName">username</param>
/// <param name="dominio">dominio</param>
@@ -843,6 +843,24 @@ namespace ETS_Data
return answ;
}
/// <summary>
/// restituisce email di un utente dato username e dominio...
/// </summary>
/// <param name="CognomeNome">Cognome Nome</param>
/// <returns></returns>
public string emailDaCognomeNome(string CognomeNome)
{
string answ = "-";
try
{
DataLayer_AnagGen.UTENTERow riga = DataWrap.DW.taUtente.getByCognomeNome(CognomeNome)[0];
answ = riga.EMAIL;
}
catch
{
}
return answ;
}
/// <summary>
/// restituisce cognome e nome di un utente dato username eventualmente comprensivo di dominio...
/// </summary>
/// <param name="userNameFull">{dominio\}userName</param>
+7
View File
@@ -15,7 +15,14 @@
</connectionStrings>
-->
<appSettings>
<add key="adminAnomalieEmail" value="gparietti@etseng.it,rravasio@etseng.it,enava@etseng.it,mmolteni@etseng.it,gpw@etseng.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_fromEmail" value="gpw@etseng.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_smtpCli" value="83.103.24.19" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailUser" value="gpw@etseng.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailPwd" value="titikaka9801" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_enableSSL" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="intUpdatePagina_ms" value="300000" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="baseUrl" value="http://192.168.2.157/PROJ-ETS" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="urlEtsDip" value="http://192.168.2.157/DIP" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="ETS_WSConnectionString" value="Data Source=localhost;Initial Catalog=ETS_WS;Persist Security Info=True;User ID=steamware;Password=viadante16" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="ETS_AnagraficaConnectionString" value="Data Source=localhost;Initial Catalog=ETS_Anagrafica;Persist Security Info=True;User ID=steamware;Password=viadante16" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
+13 -3
View File
@@ -26,7 +26,7 @@
<add key="appName" value="PROJ-ETS" />
<add key="SiteName" value="ETS" />
<add key="mainRev" value="0.9" />
<add key="minRev" value="214" />
<add key="minRev" value="215" />
<add key="stdEmail" value="info@steamware.net" />
<add key="_safePages" value="Default.aspx#unauthorized.aspx#forceUser.aspx#login.aspx#test.aspx#Test.aspx" />
<!--area gestione auth cookie-->
@@ -57,9 +57,19 @@
<add key="soglia4" value="40" />
<add key="char2showComm" value="30" />
<add key="separatoreTrim" value="..." />
<!--Gestione email-->
<add key="_fromEmail" value="GPW@steamware.net"/>
<add key="_smtpCli" value="10.74.82.254"/>
<add key="_emailUser" value=""/>
<add key="_emailPwd" value=""/>
<add key="_enableSSL" value="false"/>
<!--Gestione mail assengazione commessa a CC-->
<add key="emailCC_subject" value="Notifica assegnazione nuova commessa in PROJ-ETS"/>
<add key="emailCC_body1" value=""/>
<add key="baseUrl" value="http://iis01/PROJ-ETS" />
<add key="destCcProjEmail" value="samuele@steamware.net" />
<add key="emailCC_subject" value="Notifica assegnazione nuova commessa in PROJ-ETS" />
<add key="emailCC_body_CogNome" value="Buongiorno {Cognome} {Nome}, ti informiamo che hai in carico come CC la seguente commesse :"/>
<add key="emailCC_body_DatiComm" value=""/>
<add key="emailCC_body_Firma" value=""/>
<!--area conf dataset classi esterne-->
<add key="ETS_WSConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=ETS_WS;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="ETS_AnagraficaConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=ETS_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer" />
@@ -5,11 +5,13 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ETS_Data;
using NLog;
namespace PROJ_ETS.WebUserControls
{
public partial class mod_datiComm : System.Web.UI.UserControl
{
protected Logger lg = LogManager.GetCurrentClassLogger();
/// <summary>
/// caricamento pagina
/// </summary>
@@ -253,25 +255,72 @@ namespace PROJ_ETS.WebUserControls
/// <param name="e"></param>
protected void btnEmailCC_Click(object sender, EventArgs e)
{
string fromEmail = utils.obj.confReadString("_fromEmail");
string adminEmail = utils.obj.confReadString("adminAnomalieEmail");
string adminContinuatoEmail = utils.obj.confReadString("adminContinuatoEmail");
string adminOreLavEmail = utils.obj.confReadString("adminOreLavEmail");
string oggettoEmail = "";
string corpoEmail = "";
oggettoEmail = "Anomalie GPW: Approvazione Timbrature";
corpoEmail = string.Format("Risultano a sistema le seguenti anomalie:<br/><a href=\"{0}A1/approvTimbrature.aspx\">timbrature da approvare</a><br/><br/>", memLayer.ML.confReadString("baseUrl"));
corpoEmail += string.Format("{0}<br/>", SteamwareStrings.charLine('-', 80));
corpoEmail += "| -- DATA --\t| Dipendente<br/>";
corpoEmail += string.Format("{0}<br/>", SteamwareStrings.charLine('-', 80));
foreach (DS_Applicazione.TimbratureExplRow riga in tabTimbExpl)
{
corpoEmail += string.Format("| {0:yyyy.MM.dd ddd}\t| {1}<br/>", riga.dataLav, riga.CognomeNome);
}
corpoEmail += SteamwareStrings.charLine('-', 80);
gestEmail.geAuth.mandaEmail(fromEmail, adminEmail, oggettoEmail, corpoEmail);
//utils.obj.se
// dati x url documento
string urlEtsDip = utils.obj.confReadString("urlEtsDip");
string urlPage = utils.obj.confReadString("urlPage");
string param = utils.obj.confReadString("param");
string urlDoc = "";
// recupero dati commessa...
Ds_ProjEts.DatiCommessaRow rigaComm = null;
string ccEmail = "";
string fromEmail = "";
string adminEmail = "";
string oggettoEmail = "";
string corpoEmail = "";
fromEmail = utils.obj.confReadString("_fromEmail");
adminEmail = utils.obj.confReadString("destCcProjEmail");
oggettoEmail = "Notifica assegnazione Commessa Proj-ETS";
int idxCli = 0;
string nomeCli = "";
try
{
rigaComm = (Ds_ProjEts.DatiCommessaRow)DataProxy_ProjEts.DP.taDC.GetData(idxFaseSel)[0];
// recupero info sul capo commessa...
ccEmail = user_std.UtSn.emailDaCognomeNome(rigaComm.CapoCommessa);
// carico altri dati
idxCli = DataProxy_ProjEts.DP.taAP.getByIdxPrj(utils.obj.IntSessionObj("idxProgetto_sel"))[0].idxCliente;
nomeCli = DataProxy_ProjEts.DP.taSelCli.getByValue(idxCli)[0].label;
// preparo ed invio email
corpoEmail = string.Format("Buongiorno {0} ({1}),<br /><br />La presente per informarti che sei stato designato CC per la seguente Commessa:<br/><br/>", rigaComm.CapoCommessa, ccEmail);
corpoEmail += "----------------------------------------------------------<br/>";
corpoEmail += string.Format("{0:####}-{1} - {2}<br/>", rigaComm.NumeroCommessa, rigaComm.AnnoCommessa, rigaComm.nickname);
corpoEmail += string.Format("{0}<br/>", rigaComm.NomeComm);
corpoEmail += "----------------------------------------------------------<br/>";
corpoEmail += string.Format("cliente: {0}<br />", nomeCli);
corpoEmail += string.Format("importo: {0:C2}<br />", rigaComm.Importo);
}
catch
{
lg.Error("Errore: non è stato possibile recuperare i dati di commessa");
}
// cerco di recuperare altri dati
try
{
urlDoc = string.Format(@"{0}/{1}?{2}={3}", urlEtsDip, urlPage, param, rigaComm.urlOfferta);
corpoEmail += string.Format("rif offerta: <a href=\"{1}\">{0}</a><br />", rigaComm.rifOfferta, urlDoc);
}
catch
{ }
// cerco di recuperare altri dati
try
{
urlDoc = string.Format(@"{0}/{1}?{2}={3}", urlEtsDip, urlPage, param, rigaComm.urlOrdine);
corpoEmail += string.Format("rif ordine: <a href=\"{1}\">{0}</a><br />", rigaComm.rifOrdine, urlDoc);
//corpoEmail += "-----------------------------<br/>";
//corpoEmail += string.Format("<br /><a href=\"{0}/A1/approvTimbrature.aspx\">clicca qui</a> per completare i dati relativi alle fasi e stabilire il BCWS", utils.obj.confReadString("baseUrl"));
}
catch
{ }
//invio email
try
{
// email al CC
ETS_Data.utils.gestEmail.geAuth.mandaEmail(fromEmail, ccEmail, oggettoEmail, corpoEmail);
// email ai resp a latere
ETS_Data.utils.gestEmail.geAuth.mandaEmail(fromEmail, adminEmail, oggettoEmail, corpoEmail);
}
catch
{ }
}
}
}
@@ -178,7 +178,8 @@ namespace PROJ_ETS.WebUserControls
}
catch (Exception exc)
{
lg.ErrorException("Errore lettura dati IR", exc);
// troppi falsi allarmi...
if (false) lg.ErrorException("Errore lettura dati IR", exc);
}
try
{
Binary file not shown.
Binary file not shown.
Binary file not shown.