Exemplo n.º 1
0
    /*
     <!--
    <form id="form1" runat="server">
      <asp:Button ID="Button1" runat="server" Text="Listar todas as ordens" OnClick="Button1_Click" />
      <br />
      <br />
      <asp:GridView ID="GridView1" runat="server">
      </asp:GridView>
      <br />
    </form>
    -->
     */
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)                                        // first load in a session
        //    GridView1.Visible = false;
        string address = ConfigurationManager.AppSettings["RemoteAddress"];
        orderObj = (Common.OrderList)Activator.GetObject(typeof(Common.OrderList), address);
        aux = new Dictionary<DropDownList, TextBox>();

        for (int i = 0; i < 7; i++)
        {
            DropDownList ddl = new DropDownList();
            ddl.Items.Add(new ListItem("Chirashizushi", "Chirashizushi"));
            ddl.Items.Add(new ListItem("Inarizushi", "Inarizushi"));
            ddl.Items.Add(new ListItem("Makizushi", "Makizushi"));
            ddl.Items.Add(new ListItem("Narezushi", "Narezushi"));
            ddl.Items.Add(new ListItem("Nigirizushi", "Nigirizushi"));
            ddl.Items.Add(new ListItem("Oshizushi", "Oshizushi"));
            ddl.Items.Add(new ListItem("Western-style sushi", "Western-style sushi"));

            Label l = new Label();
            l.Text = "quantity";

            TextBox t = new TextBox();
            if (i > 0)
            {
                ddl.Visible = false;
                l.Visible = false;
                t.Visible = false;
            }
            sushitypes.Controls.Add(ddl);
            sushitypes.Controls.Add(l);
            sushitypes.Controls.Add(t);
            sushitypes.Controls.Add(new LiteralControl("<br />"));
            aux.Add(ddl, t);
        }
    }
Exemplo n.º 2
0
 public OrderEventHandler(OrderList l)
 {
     all_orders = l;
     relevant_orders = new BindingList<Order>();
 }
Exemplo n.º 3
0
 public OrderEventHandler(OrderList l, status wanted_status)
 {
     all_orders = l;
     relevant_orders = l.GetOrderWithStatus(wanted_status);
 }