Esempio n. 1
0
    protected void LinkButton1_Click(object sender, EventArgs e) //Nova Amostra
    {
        Produtor p = new Produtor();

        DropDownProdutor.DataSource     = p.PesquisaProdutor();
        DropDownProdutor.DataTextField  = "Nome";
        DropDownProdutor.DataValueField = "Cpf";
        DropDownProdutor.DataBind();
        DropDownProdutor.Items.Insert(0, new ListItem("Produtor", "0"));
        TipoCafe TC = new TipoCafe();

        DropDownList1.DataSource     = TC.PesquisaTipo();
        DropDownList1.DataTextField  = "TNome";
        DropDownList1.DataValueField = "Id";
        DropDownList1.DataBind();
        DropDownList1.Items.Insert(0, new ListItem("Tipo", "0"));
        BebidaCafe BC = new BebidaCafe();

        DropDownList2.DataSource     = BC.PesquisaBebida();
        DropDownList2.DataTextField  = "BNome";
        DropDownList2.DataValueField = "Id";
        DropDownList2.DataBind();
        DropDownList2.Items.Insert(0, new ListItem("Bebida", "0"));
        this.Div_Nova_Amostra.Visible            = true;
        this.Div_Amostra_Analizada.Visible       = false;
        this.Div_Contato.Visible                 = false;
        this.Div_Perfil_da_Empreza.Visible       = false;
        this.Div_Historico_de_Negociação.Visible = false;
        this.Div_Editar_Perfil.Visible           = false;
        this.Divbemvindo.Visible                 = false;
        this.Div_Erro.Visible = false;
        TextBox9.Text         = "";
    }
Esempio n. 2
0
        public static IServidorCafe Instanciar(TipoCafe tipoCafe)
        {
            switch (tipoCafe)
            {
            case TipoCafe.Americano:
                return(new BaristaAmericano());

            case TipoCafe.Espresso:
                return(new BaristaEspresso());

            case TipoCafe.Latte:
                return(new BaristaLatte());

            case TipoCafe.Mocaccino:
                return(new BaristaMocaccino());

            default:
                throw new ArgumentException("No existe un blah para esta wea", "tipoCafe");
            }
        }
Esempio n. 3
0
 public Orden(TipoCafe tipoCafe, Tamaño tamaño)
 {
     this.TipoCafe = tipoCafe;
     this.Tamaño   = tamaño;
 }