public DelOrder() { InitializeComponent(); c = new CrudComp(); _listaP = new Dictionary <Prodotto, int>(); int temp = 0, maxWidth = 0; foreach (Cliente c in c.SearchAllCliente()) { cbxCliente.Items.Add(c); temp = TextRenderer.MeasureText(c.ToString(), cbxCliente.Font).Width; if (temp > maxWidth) { maxWidth = temp; } } if (cbxCliente.Items.Count != 0) { cbxCliente.SelectedIndex = 0; cbxCliente.DropDownWidth = maxWidth; } foreach (TipiPagamento t in c.SearchAllTipiPagamento()) { cbxPagamento.Items.Add(t); } if (cbxPagamento.Items.Count != 0) { cbxPagamento.SelectedIndex = 0; } }
public ProductsToOrder(Form f, Dictionary <Prodotto, int> d1) { InitializeComponent(); txtModProd.Enabled = true; cbxModProd.Enabled = true; btnModProd.Enabled = true; dReceived = d1; FillShowProd(); c = new CrudComp(); int temp = 0, maxWidth = 0; foreach (Prodotto p in c.SearchAllProdotto()) { cbxNewProd.Items.Add(p); temp = TextRenderer.MeasureText(p.ToString(), cbxNewProd.Font).Width; if (temp > maxWidth) { maxWidth = temp; } } if (cbxNewProd.Items.Count != 0) { cbxNewProd.SelectedIndex = 0; cbxNewProd.DropDownWidth = maxWidth; } FillCheckBox(cbxModProd, dReceived); FillCheckBox(cbxDelProd, dReceived); }
public UpdCategory() { InitializeComponent(); c = new CrudComp(); cbxIva.Items.Add("4"); cbxIva.Items.Add("10"); cbxIva.Items.Add("22"); cbxIva.SelectedIndex = 2; }
public ShowAll() { InitializeComponent(); c = new CrudComp(); rdbCategory.CheckedChanged += new EventHandler(radioButtons_CheckedChanged); rdbClient.CheckedChanged += new EventHandler(radioButtons_CheckedChanged); rdbOrder.CheckedChanged += new EventHandler(radioButtons_CheckedChanged); rdbProduct.CheckedChanged += new EventHandler(radioButtons_CheckedChanged); }
public override string ToString() { string fattura = "ID: " + _id + ", Codice: " + _codiceordine + "\r\n" + _cliente.ToString() + "Data: " + _data + ", " + _tipopagamento.ToString() + "\r\nProdotti:\r\n"; foreach (KeyValuePair <Prodotto, int> p in _listaprodotti) { fattura += p.Key.Denominazione + ", prezzo (iva inclusa): " + p.Key.PrezzoIvato() + "€, quantità: " + p.Value + "\r\n"; } CrudComp c = new CrudComp(); return(fattura += "Totale con Iva: " + TotaleIvato() + "€\r\nTotale Complessivo: " + c.PrezzoTotaleOrdineConSconto(_id) + "€\r\n"); }
public Form1() { InitializeComponent(); try { c = new CrudComp(); c.DashBoardCreation(textBox1); } catch (SqlException) { MessageBox.Show("Connessione al database non funzionante, controlla per favore i dati di connessione."); tsmNew.Enabled = false; tsmUpdate.Enabled = false; tsmDelete.Enabled = false; tsmElenco.Enabled = false; tsmDettaglio.Enabled = false; } }
public UpdProduct() { InitializeComponent(); cc = new CrudComp(); List <Categoria> l = cc.SearchAllCategoria(); int temp = 0, maxWidth = 0; foreach (Categoria cat in l) { cbxCategoria.Items.Add(cat); temp = TextRenderer.MeasureText(cat.ToString(), cbxCategoria.Font).Width; if (temp > maxWidth) { maxWidth = temp; } } if (cbxCategoria.Items.Count != 0) { cbxCategoria.SelectedIndex = 0; cbxCategoria.DropDownWidth = maxWidth; } }
public NewClient() { InitializeComponent(); c = new CrudComp(); }
public ShowByID() { InitializeComponent(); c = new CrudComp(); }