public void Search(object sender, ExtListSearchArgs e) { string ProgTipografo = string.Empty; if (BollettarioDataSource.CanLoad) { if (BollettarioDataSource.DomainContext == null) { BollettarioDataSource.DomainContext = BABollettari.Globals._context; } BollettarioDataSource.QueryParameters.Clear(); if (e.Parameters.ContainsKey("ProgTipografo")) { if (e.Parameters["ProgTipografo"].ToString() != "*") { ProgTipografo = e.Parameters["ProgTipografo"].ToString(); } } BollettarioDataSource.QueryParameters.Add(new Parameter { ParameterName = "progTipografo", Value = ProgTipografo.ToString() }); BollettarioDataSource.Load(); } else { MessageBox.Show("Sto caricando i dati dal database. Un momento di pazienza", "", MessageBoxButton.OK); } }
public void PopolaGrid(string ProgTipografo) { if (BollettarioDataSource.DomainContext == null) { BollettarioDataSource.DomainContext = BABollettari.Globals._context; } BollettarioDataSource.QueryParameters.Clear(); BollettarioDataSource.QueryParameters.Add(new Parameter { ParameterName = "progTipografo", Value = ProgTipografo.ToString() }); BollettarioDataSource.Load(); }