private void ResetDataInTreeView() { c1TreeView1.Columns.Clear(); c1TreeView1.BindingInfo.DataSource = null; c1TreeView1.BindingInfo.DataMember = "\\ProductsGroups\\Products"; var column = new C1TreeColumn(); column.HeaderText = "Name"; c1TreeView1.Columns.Add(column); column = new C1TreeColumn(); column.DisplayFieldName = "CountOfProducts"; column.HeaderText = "Products in store"; column.AutoWidth = false; column.Width = 100; c1TreeView1.Columns.Add(column); column = new C1TreeColumn(); column.DisplayFieldName = "\\\\Price"; column.HeaderText = "Price"; column.Width = 200; c1TreeView1.Columns.Add(column); c1TreeView1.BindingInfo.DataSource = StoreCollection.GetData(); c1TreeView1.Nodes[0].Images.Add(0); c1TreeView1.Nodes[1].Images.Add(1); c1TreeView1.Nodes[2].Images.Add(2); }
public StoreCollection GetAllStores() { StoreCollection stores = new StoreCollection(); stores.GetMulti(null); return(stores); }
public StoreCollection GetAllStores() { StoreCollection stores = new StoreCollection(); stores.GetMulti(null); return stores; }
private static void ICollectionTest() { StoreCollection collection = new StoreCollection(@"F:\test.txt"); collection.Add(2020); collection.Remove(2020); foreach (int i in collection) { Console.WriteLine(i); } }
private void Initialize() { c1Ribbon1.SelectedTabIndex = 1; foreach (var theme in C1ThemeController.GetThemes()) { ribbonCmbThemes.Items.Add(theme); } // init TreeView c1TreeView1.Columns.Clear(); c1TreeView1.DataSource = null; c1TreeView1.DataMember = "\\ProductsGroups\\Products"; var column = new C1TreeColumn { HeaderText = "Name" }; c1TreeView1.Columns.Add(column); column = new C1TreeColumn { DisplayFieldName = "\\\\Count", HeaderText = "Count", Width = 100 }; c1TreeView1.Columns.Add(column); column = new C1TreeColumn { DisplayFieldName = "\\\\Price", HeaderText = "Price", Width = 200 }; c1TreeView1.Columns.Add(column); c1TreeView1.DataSource = StoreCollection.GetData(); c1TreeView1.ExpandAll(); // init ExpressionEditor c1ExpressionEditor1.IntelliAutoCompletionEnabled = false; var ce = new ExpressionEditorCustomEngine.CustomEngine(); var cl = new CustomLexer(); c1ExpressionEditor1.SetCustomEngine(ce, cl); c1ExpressionEditor1.DataSource = c1TreeView1.DataSource; c1ExpressionEditor1.Expression = "[ProductsGroups].Where(x => x.Name == \"Notebooks\").Sum(x => x.Products.Sum(p => p.Count))"; var p = new CustomPresenter(); CustomPresenter.Editor = c1ExpressionEditor1; c1TreeView1.Columns[1].CustomContentPresenter = p; }
public PluginSettingStoreCollectionEditor() { this.Content = placeholder = new Placeholder { Text = "No plugins containing this type are installed.", ExtraContent = new Button { Text = "Open Plugin Manager", Command = new Command((s, e) => App.Current.PluginManagerWindow.Show()) } }; mainContent = new Splitter { Panel1MinimumSize = 150, Panel1 = new Scrollable { Border = BorderType.None, Content = sourceSelector = new TypeListBox <TSource>() }, Panel2 = new Scrollable { Content = settingStoreEditor = new ToggleablePluginSettingStoreEditor() { Padding = 5 } } }; settingStoreEditor.StoreBinding.Bind( sourceSelector.SelectedItemBinding.Convert(t => StoreCollection?.FromType(t)) ); if (!Platform.IsMac) // Don't do this on macOS, causes poor UI performance. { settingStoreEditor.BackgroundColor = SystemColors.WindowBackground; } AppInfo.PluginManager.AssembliesChanged += HandleAssembliesChanged; }
// GET: api/Stores public HttpResponseMessage Get() { try { var listadoTiendas = new StoreCollection(); using (var ctx = SharePoint.GetContext(userName, passWord, webURL)) { listadoTiendas.GetFromSharePoint(ctx); } return(Request.CreateResponse(HttpStatusCode.OK, listadoTiendas)); } catch (Exception ex) { var msg = new HttpResponseMessage() { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(ex.Message) }; return(msg); } }
public StoreService(StoreCollection storeCollection) { _storeCollection = storeCollection; }
public ShoppingCart() { _items = new CardItemCollection(); _stores = new StoreCollection(); }
private static void AddUpdateDeleteStores(ZipArchiveEntry entry) { IEnumerable<Store> stores = null; using (var entryStream = entry.Open()) { Console.WriteLine("stores.csv is {0} bytes", entry.Length); Console.WriteLine("Starting stores at {0:hh:mm:ss.fff}", DateTime.Now); var storeTimer = new Stopwatch(); storeTimer.Start(); var reader = new StreamReader(entryStream); var csv = new CsvReader(reader); csv.Configuration.RegisterClassMap(new StoreMap()); stores = csv.GetRecords<Store>().Where(s => !s.IsDead); var storesCollection = new StoreCollection(); storesCollection.SetItems(stores); var importer = new NpgsqlBulkImporter(ConfigurationManager.ConnectionStrings["spurious"].ConnectionString, storeTimer); importer.BulkImport("stores", storesCollection); using (var wrapper = new NpgsqlConnectionWrapper(ConfigurationManager.ConnectionStrings["spurious"].ConnectionString)) { wrapper.Connection.Open(); var rowsGeoUpdated = wrapper.ExecuteNonQuery("update stores s set (location) = ((select ST_SetSRID(ST_MakePoint(longitude, latitude), 4326) from stores ss where s.id = ss.id))"); Console.WriteLine($"Updated {rowsGeoUpdated} rows geo data from lat/long data"); } storeTimer.Stop(); Console.WriteLine("Finished stores at {0:hh:mm:ss.fff}, taking {1}", DateTime.Now, storeTimer.Elapsed); } }