Example #1
0
 public FilterByReliable(IFilterCostumer filtro, string realiable) : base(filtro)
 {
     try
     {
         if (!String.IsNullOrWhiteSpace(realiable))
         {
             _reliable = realiable;
         }
         else
         {
             throw new ArgumentNullException();
         }
     }catch (Exception e)
     {
         MessageBox.Show("Disponibilità nulla" + e.StackTrace);
     }
 }
Example #2
0
 public FilterByDenomination(IFilterCostumer filtro, string denomination) : base(filtro)
 {
     try
     {
         if (!String.IsNullOrWhiteSpace(denomination))
         {
             _denomination = denomination;
         }
         else
         {
             throw new ArgumentNullException();
         }
     }catch (Exception e)
     {
         MessageBox.Show("Filtro denominazione nullo" + e.StackTrace);
     }
 }
Example #3
0
 public FilterByType(IFilterCostumer filtro, string typeToFind) : base(filtro)
 {
     try
     {
         if (!String.IsNullOrWhiteSpace(typeToFind))
         {
             _typeToFind = typeToFind;
         }
         else
         {
             throw new ArgumentNullException();
         }
     }catch (Exception e)
     {
         MessageBox.Show("filtro type not found" + e.StackTrace);
     }
 }
Example #4
0
 public FilterByPIVA(IFilterCostumer filtro, string pIva) : base(filtro)
 {
     try
     {
         if (!String.IsNullOrWhiteSpace(pIva) || pIva.Length == 11)
         {
             _pIva = pIva;
         }
         else
         {
             throw new ArgumentNullException();
         }
     }catch (Exception e)
     {
         MessageBox.Show("filtro partita iva nullo" + e.StackTrace);
     }
 }
Example #5
0
 public FilterByEmail(IFilterCostumer filtro, string eMail) : base(filtro)
 {
     try
     {
         if (!string.IsNullOrWhiteSpace(eMail))
         {
             _eMail = new MailAddress(eMail);
         }
         else
         {
             throw new ArgumentNullException();
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("Filtro email nullo" + e.StackTrace);
     }
 }
Example #6
0
 public FilterByCF(IFilterCostumer filtro, string cF) : base(filtro)
 {
     try
     {
         if (!String.IsNullOrWhiteSpace(cF) || cF.Length == 16)
         {
             _cF = cF;
         }
         else
         {
             throw new ArgumentNullException();
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("filtro Codice fiscale nullo" + e.StackTrace);
     }
 }
Example #7
0
 protected FiltroBaseCostumer(IFilterCostumer filtro)
 {
     //Controllo che filtro non sia nullo. In caso lo sia, _filtro = filtroTutto
     _filtro = filtro ?? FiltroDiTutto;
 }