Fix warnings progetto ADM

This commit is contained in:
Samuele E. Locatelli
2020-09-07 10:30:02 +02:00
parent cb014bc8fd
commit e4973c2d39
53 changed files with 964 additions and 962 deletions
@@ -61,7 +61,7 @@ namespace GPW_Commesse.WebUserControls
protected void txtSel_TextChanged(object sender, EventArgs e)
{
if (txtSel.Text.Trim() == "")
if (string.IsNullOrEmpty(txtSel.Text.Trim()))
{
hiddenFieldID.Text = defaultVal;
_valore = defaultVal;
@@ -130,7 +130,7 @@ namespace GPW_Commesse.WebUserControls
{
answ = txtSel.Text.Trim();
}
if (answ == "")
if (string.IsNullOrEmpty(answ))
{
answ = txtSel.Text.Trim();
}
@@ -54,7 +54,7 @@ namespace GPW_Commesse.WebUserControls
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)// || txtData.Text == "")
if (!Page.IsPostBack)
{
setInitVal();
valoreDateTime = dataOra;
@@ -32,7 +32,7 @@ public partial class mod_filtro : ApplicationUserControl
{
get
{
bool answ=false;
bool answ = false;
try
{
memLayer.ML.isInSessionObject(string.Format("valFiltro_{0}", this.ID));
@@ -40,7 +40,7 @@ public partial class mod_filtro : ApplicationUserControl
catch
{ }
return answ;
}
}
}
protected bool _changeCheckEnabled = true;
protected bool _changeCheckVisible = true;
@@ -76,8 +76,8 @@ public partial class mod_filtro : ApplicationUserControl
base.OnInit(e);
if (!Page.IsPostBack)
{
if (_showFiltered == "") _showFiltered = "mostraSoloSelez";
if (_showAll == "") _showAll = "mostraTutti";
if (string.IsNullOrEmpty(_showFiltered)) _showFiltered = "mostraSoloSelez";
if (string.IsNullOrEmpty(_showAll)) _showAll = "mostraTutti";
}
}
@@ -304,7 +304,7 @@ public partial class mod_filtro : ApplicationUserControl
chkFilt.Checked = true;
}
}
catch(Exception exc)
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
dlFilt.SelectedIndex = 0;
@@ -376,7 +376,7 @@ public partial class mod_filtro : ApplicationUserControl
updateChkLbl();
}
}
/// <summary>
/// oggetto ODS con cui popolare il selettore, VINCOLO abbia campi value(key) / label
/// </summary>
@@ -53,7 +53,7 @@ namespace GPW_Commesse.WebUserControls
/// </summary>
private void checkUser()
{
if (user_std.UtSn.CognomeNome == "")
if (string.IsNullOrEmpty(user_std.UtSn.CognomeNome))
{
// fix
memLayer.ML.setSessionVal("preUrlString", "", true);
@@ -19,8 +19,8 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
#endregion
# region area protected
#region area protected
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
@@ -64,7 +64,7 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
/// </summary>
protected void salvaCerca()
{
if (testoRicerca == "")
if (string.IsNullOrEmpty(testoRicerca))
{
SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
}