Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (WorkStation_no.Text == "" || Restaurant_cbx.Text == "" || Kitchen_cbx.Text == "")
            {
                MessageBox.Show("Null Fields");
                return;
            }
            string ResturantCode = Classes.RetrieveRestaurantCode(Restaurant_cbx.SelectedItem.ToString());
            string KitchenCode   = Classes.RetrieveKitchenCode(Kitchen_cbx.SelectedItem.ToString(), Restaurant_cbx.SelectedItem.ToString());


            if (WorkStation_no.Text.Length == 1)
            {
                WorkStation_no.Text = "0" + WorkStation_no.Text;
            }
            if (ResturantCode.Length == 1)
            {
                ResturantCode = "0" + ResturantCode;
            }
            if (KitchenCode.Length == 1)
            {
                KitchenCode = "0" + KitchenCode;
            }

            string WorkStationInfo = WorkStation_no.Text + "," + ResturantCode + "," + KitchenCode + "," + WorkStation_Name.Text;

            File.WriteAllText("Workstation.dll", WorkStationInfo);
            Classes.LogTable(WorkStationInfo, WorkStation_Name.Text, "WS", "Update");

            MessageBox.Show("Saved");
            Classes.GetWS();
        }
Ejemplo n.º 2
0
        }           //Done

        private void ResturantBtn_Click(object sender, RoutedEventArgs e)
        {
            All_Resturants allRestaurant = new All_Resturants(this);

            allRestaurant.ShowDialog();
            KitchenBtn.IsEnabled = true;
            RestaurantCode       = Classes.RetrieveRestaurantCode(ShipTo.Text);
        }
        }       //Done

        private void ResturantComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (Outletcbx.SelectedItem != null)
            {
                ValOfResturant = Classes.RetrieveRestaurantCode(Outletcbx.SelectedItem.ToString());
                Kitchencbx.Items.Clear();
                DataTable Kitchens = Classes.RetrieveKitchens(Outletcbx.SelectedItem.ToString());
                for (int i = 0; i < Kitchens.Rows.Count; i++)
                {
                    Kitchencbx.Items.Add(Kitchens.Rows[i][0]);
                }
            }
        }       //Done