// This event is generated by Data Source Configuration Wizard void pLinqInstantFeedbackSource1_GetEnumerable(object sender, DevExpress.Data.PLinq.GetEnumerableEventArgs e) { // Instantiate a new DataContext QLNS28.QLNSDataContext dataContext = new QLNS28.QLNSDataContext(); // Assign a queryable source to the PLinqInstantFeedbackSource e.Source = dataContext.ChamCongs; // Assign the DataContext to the Tag property, // to dispose of it in the DismissEnumerable event handler e.Tag = dataContext; }
// This event is generated by Data Source Configuration Wizard void pLinqInstantFeedbackSource1_GetEnumerable(object sender, DevExpress.Data.PLinq.GetEnumerableEventArgs e) { // Instantiate a new DataContext DBHesabdari_TG.MyContext dataContext = new DBHesabdari_TG.MyContext(); // Assign a queryable source to the PLinqInstantFeedbackSource if (isActive == true) { e.Source = dataContext.MsSalMalis.Where(p => p.SalMaliIsActive == true); } else { e.Source = dataContext.MsSalMalis.Where(p => p.SalMaliIsActive == false); } // Assign the DataContext to the Tag property, // to dispose of it in the DismissEnumerable event handler e.Tag = dataContext; }
// This event is generated by Data Source Configuration Wizard void pLinqInstantFeedbackSource1_DismissEnumerable(object sender, DevExpress.Data.PLinq.GetEnumerableEventArgs e) { // Dispose of the DataContext ((QLNS28.QLNSDataContext)e.Tag).Dispose(); }