示例#1
0
 public void Copy(TAppOrderItem item)
 {
     DishId   = item.DishId;
     Id       = item.Id;
     DishName = item.DishName;
     Price    = item.Price;
     Amount   = item.Amount;
     Text     = item.Text;
     Order    = item.Order;
 }
示例#2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        //insert one item into the order

        // <asp:Parameter Name="sessionid" Type="Int32" />
        //        <asp:Parameter Name="item" Type="Object" />

        RestaurantApp.TAppOrderItem item = new RestaurantApp.TAppOrderItem();
        item.DishName = " fried rice";
        //RestaurantApp.OrderObj.insertOrderItem((int)Session["SessionID"], item);

        form1.DataBind();
    }
示例#3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        //insert one item into the order

        // <asp:Parameter Name="sessionid" Type="Int32" />
        //        <asp:Parameter Name="item" Type="Object" />


        RestaurantApp.TAppOrderItem item = new RestaurantApp.TAppOrderItem();
        item.DishName = " fried rice";
        //RestaurantApp.OrderObj.insertOrderItem((int)Session["SessionID"], item);



        form1.DataBind();
    }
示例#4
0
        public void ChipIn1For5()
        {
            int count = Items.Count;

            for (int i = 0; i < count; i++)
            {
                int chipIn = ((int)Items[i].Amount) / 5;
                if (chipIn > 0)
                {
                    TAppOrderItem chipInItem = new TAppOrderItem();
                    chipInItem.Copy(Items[i]);
                    chipInItem.Amount = chipIn;
                    chipInItem.Price  = 0;
                    Items.Add(chipInItem);
                }
            }
        }
示例#5
0
        public void ChipIn1For5()
        {
            int count = Items.Count;

            for (int i = 0; i < count; i++)
            {
                int chipIn = ((int)Items[i].Amount) / 5;
                if (chipIn > 0)
                {
                    TAppOrderItem chipInItem = new TAppOrderItem();
                    chipInItem.Copy(Items[i]);
                    chipInItem.Amount = chipIn;
                    chipInItem.Price = 0;
                    Items.Add(chipInItem);
                }
            }
        }
示例#6
0
 public void Copy(TAppOrderItem item)
 {
     DishId = item.DishId;
     Id = item.Id;
     DishName = item.DishName;
     Price = item.Price;
     Amount = item.Amount;
     Text = item.Text;
     Order = item.Order;
 }