public ProductArr GetCars() { int Id = 0; string Status = ""; //אם המשתמש רשם ערך בשדה המזהה if (txt_Id.Text != "") { Id = int.Parse(txt_Id.Text); } //מייצרים אוסף של כלל הלקוחות ProductArr productArr = new ProductArr(); productArr.Fill(); productArr.Sort(); if (rdb_Buy.Checked) { Status = "Buy"; } else if (rdb_Rent.Checked) { Status = rdb_Rent.Text; } //מסננים את אוסף הלקוחות לפי שדות הסינון שרשם המשתמש productArr = productArr.Filter(Id, txt_LicenseNumber.Text, Status, cmb_Category.SelectedItem as Category, cmb_Company.SelectedItem as Company); return(productArr); }
public void CarArrToForm() { ProductArr productArr = new ProductArr(); productArr.FillBuy(); productArr.Sort(); ShowColumns(productArr); }
private void Form_ViewCarForBuy_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F && e.Modifiers == Keys.Control) { this.TopMost = false; ProductArr productArr = new ProductArr(); productArr.Fill(); productArr.Sort(); Form_FilterView newform = new Form_FilterView(productArr.MaxPriceBuy().ToString()); if (newform.ShowDialog() == DialogResult.OK) { this.dgv_Cars.Rows.Clear(); ShowColumns(newform.GetCars()); } this.TopMost = true; } else if (e.KeyCode == Keys.I && e.Modifiers == Keys.Control) { // Show Instructions lbl_Instructions.Visible = isopen; isopen = !isopen; } else if (e.KeyCode == Keys.Escape) { Form_MidView newform = new Form_MidView(newemployee, form); form.OpenForm(newform); } else if (e.KeyCode == Keys.N && e.Modifiers == Keys.Control) { // Form_Home newform = new Form_Home(newemployee, true); Form_Product newform = new Form_Product(newemployee); form.OpenForm(newform); form.MovePanel(form.btn_Product); } }
public void ProductArrToForm(Product curProduct) { ProductArr productArr = new ProductArr(); productArr.Fill(); productArr.Sort(); listbox_Cars.DataSource = productArr; listbox_Cars.ValueMember = "ID"; listbox_Cars.DisplayMember = "FullModel"; if (curProduct != null) { listbox_Cars.SelectedValue = curProduct.Id; } }
public ProductArr GetCars() { int minPrice = 0, maxPrice; ProductArr productArr = new ProductArr(); productArr.Fill(); productArr.Sort(); maxPrice = Convert.ToInt32(txt_maxPrice.Text); minPrice = Convert.ToInt32(txt_minPrice.Text); //מסננים את אוסף הלקוחות לפי שדות הסינון שרשם המשתמש productArr = productArr.Filter(cmb_Company.SelectedItem as Company, minPrice, maxPrice); return(productArr); }
private void ProductArrToForm(Product curProduct) { ProductArr productArr = new ProductArr(); productArr.FillBuyAvailable(); productArr.Sort(); listbox_Cars.DataSource = productArr; if (productArr != null) { listbox_Cars.ValueMember = "ID"; listbox_Cars.DisplayMember = "FullModel"; } if (curProduct != null) { listbox_Cars.SelectedValue = curProduct.Id; } }