Ejemplo n.º 1
0
 public Carrello(Catalogo catalogo)
 {
     _catalogoSessione = catalogo;
     InitializeComponent();
     _catalogoSessione.CarrelloSessione = this;
     //ottengo un oggetto carrello
     ShoppyHomeClient.Models.Model.Spesa.Carrello carrello = null /*da modificare*/;
     _carrello = carrello;
 }
Ejemplo n.º 2
0
        private void ConfermaButton_Click(object sender, EventArgs e)
        {
            String market = (String)ListaMarketBox.SelectedItem;

            //messaggio a schermo per verifica, da cancellare
            System.Windows.Forms.MessageBox.Show(market);
            //the end verifica
            Catalogo cat = new Catalogo(_homeSpesa);
            Carrello car = new Carrello(cat);

            cat.Show();
            Close();
        }
Ejemplo n.º 3
0
        public Verifica_Conferma(Carrello carrello, Catalogo catalogo, Boolean fc)
        {
            _carrelloSessione = carrello;
            _catalogoSessione = catalogo;
            _fromCarrello     = fc;
            InitializeComponent();
            //ottengo utente e carello
            _utente   = null;
            _carrello = null;
            if (_utente == null || _carrello == null)
            {
                System.Windows.Forms.MessageBox.Show("Errore");
            }
            else
            {
                int                     qta;
                ListViewItem            lvi  = new ListViewItem();
                List <ElementoCatalogo> keys = new List <ElementoCatalogo>(_carrello.ElencoProdottiScelti().Keys);
                foreach (ElementoCatalogo e in keys)
                {
                    _carrello.ElencoProdottiScelti().TryGetValue(e, out qta);
                    lvi.Text = e.IdNegozio.ToString();
                    //lvi.SubItems.Add("" + p.Prezzo);
                    lvi.SubItems.Add("" + qta);
                    VistaCarrello.Items.Add(lvi);
                }

                this.Nome.Text      = _utente.Nome;
                this.Cognome.Text   = _utente.Cognome;
                this.Email.Text     = _utente.Email;
                this.Telefono.Text  = _utente.Telefono;
                this.Provincia.Text = _utente.Provincia;
                this.Citta.Text     = _utente.Citta;
                this.Via.Text       = _utente.Via;
                this.Civico.Text    = "" + _utente.NumeroCivico;
                DateTime now = DateTime.Today;
                now = new DateTime(now.Year, now.Month, now.Day + 1, 8, 30, 0);
                this.DataConsegna.Value = now;
            }
        }