Ejemplo n.º 1
0
        private void takeAwayOrder(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            using (OrderED order = new OrderED(btn.Name))
            {
                if (order.ShowDialog() != DialogResult.OK)
                {
                    // do some thing
                }
            }
        }
Ejemplo n.º 2
0
        private void btn_addDelieveryOrder_Click(object sender, EventArgs e)
        {
            var results = this.dt_OrderTypes.Select("").FirstOrDefault(x => x["code"].ToString().Equals("home_delivery"));

            if (results != null)
            {
                this.orderType_id   = results["id"].ToString();
                this.orderType_name = results["code"].ToString();

                Hashtable orderData = new Hashtable();
                orderData.Add("orderTypeID", this.orderType_id);
                orderData.Add("orderTypeName", this.orderType_name);

                using (OrderED order = new OrderED(orderData))
                {
                    if (order.ShowDialog() != DialogResult.OK)
                    {
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void Button_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            this.isTableSelected = true;
            this.selectedTable   = btn.Name;

            this.orders          = new Orders();
            this.orders.Table_id = btn.Name;
            if (this.orders.isTableNotFree())
            {
                using (OrderED order = new OrderED(this.orders.getOrderIdByTable()))
                {
                    if (order.ShowDialog() != DialogResult.OK)
                    {
                        // do some thing
                    }
                }
            }
            else
            {
                Hashtable orderData = new Hashtable();
                orderData.Add("orderTypeID", this.orderType_id);
                orderData.Add("orderTypeName", this.orderType_name);
                orderData.Add("floor_id", this.floor_id);
                orderData.Add("floor_name", this.floor_name);
                orderData.Add("zone_id", this.zone_id);
                orderData.Add("zone_name", this.zone_name);
                orderData.Add("table_id", btn.Name);
                orderData.Add("table_name", btn.Text);

                using (OrderED order = new OrderED(orderData))
                {
                    if (order.ShowDialog() != DialogResult.OK)
                    {
                        // do some thing
                    }
                }
            }
        }