private void BillStoveRegulator_Load(object sender, EventArgs e) { Location = new Point(-7, 50); int w = SystemInformation.VirtualScreen.Width + 14; int h = SystemInformation.VirtualScreen.Height - 43; Size = new Size(w, h); dataGridView1.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 10); dataGridView2.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 10); dataGridView3.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 10); using (StockMgntRef.StockMgntClient client = new StockMgntRef.StockMgntClient()) { stoves = client.GetStoves().ToList(); List <StockMgntRef.Stove> stoveTypes = stoves.Where(x => x.Price != 0).Select(x => x).ToList(); dataGridView2.DataSource = stoveTypes; } using (CustomerMgntRef.CustomerMgntClient client1 = new CustomerMgntRef.CustomerMgntClient()) { customersNames = client1.GetCustomersName(); AutoCompleteStringCollection acsc = new AutoCompleteStringCollection(); acsc.AddRange(customersNames); textBox1.AutoCompleteMode = AutoCompleteMode.Suggest; textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource; textBox1.AutoCompleteCustomSource = acsc; } }
private void BookCylinder_Load(object sender, EventArgs e) { Location = new Point(-7, 50); int w = SystemInformation.VirtualScreen.Width + 14; int h = SystemInformation.VirtualScreen.Height - 43; Size = new Size(w, h); CustomerMgntRef.CustomerMgntClient client = new CustomerMgntRef.CustomerMgntClient(); customersNames = client.GetCustomersName(); AutoCompleteStringCollection acsc = new AutoCompleteStringCollection(); acsc.AddRange(customersNames); textBox1.AutoCompleteMode = AutoCompleteMode.Suggest; textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource; textBox1.AutoCompleteCustomSource = acsc; button2.Enabled = false; }