コード例 #1
0
 /// <summary>
 /// Constructor , initialize data
 /// </summary>
 public ClientWindow()
 {
     InitializeComponent();
     client           = new Client();
     this.DataContext = client;
     bl = Factory_BL.GetBL();
 }
コード例 #2
0
 /// <summary>
 /// Constructor , initialize the window , data binding, and combobox
 /// </summary>
 public AddBranch()
 {
     InitializeComponent();
     branch           = new Branch();
     this.DataContext = branch;
     bl = Factory_BL.GetBL();
     this.cashroutLevelComboBox.ItemsSource = Enum.GetValues(typeof(CasheRoutLevel));
 }
コード例 #3
0
 /// <summary>
 /// Constructor , initialize data
 /// </summary>
 public DeleteDish()
 {
     InitializeComponent();
     dish = new Dish();
     bl   = Factory_BL.GetBL();
     this.ListCombobox.ItemsSource = bl.ListOfDish();
     this.CancelButton.IsEnabled   = false;
 }
コード例 #4
0
 /// <summary>
 /// Constructor, initialize all data
 /// </summary>
 public DeleteOrderWindow()
 {
     InitializeComponent();
     order = new Order();
     // getting all the function
     bl = Factory_BL.GetBL();
     this.ListCombobox.ItemsSource = bl.ListOfOrder();
     this.CancelButton.IsEnabled   = false;
 }
コード例 #5
0
 /// <summary>
 /// Constructor , initalize data
 /// </summary>
 public AddDish()
 {
     InitializeComponent();
     this.requestComboBox.ItemsSource    = Enum.GetValues(typeof(CasheRoutLevel));
     this.sizeOfDishComboBox.ItemsSource = Enum.GetValues(typeof(size));
     dish             = new Dish();
     this.DataContext = dish;
     bl = Factory_BL.GetBL();
 }
コード例 #6
0
 /// <summary>
 /// Constructor , initialize data
 /// </summary>
 public DeleteBranch()
 {
     InitializeComponent();
     branch           = new Branch();
     this.DataContext = branch;
     bl = Factory_BL.GetBL();
     ListCombobox.ItemsSource    = bl.ListOfBranch();
     this.CancelButton.IsEnabled = false;
 }
コード例 #7
0
 /// <summary>
 /// Constructor , initialize data
 /// </summary>
 public UpdateDish()
 {
     InitializeComponent();
     dish             = new Dish();
     this.DataContext = dish;
     bl = Factory_BL.GetBL();
     ListBranch.ItemsSource              = bl.ListOfDish();
     nameTextBox.IsEnabled               = preparationTimeTextBox.IsEnabled = priceOfDishTextBox.IsEnabled = quantityTextBox.IsEnabled = requestComboBox.IsEnabled = sizeOfDishComboBox.IsEnabled = false;
     this.requestComboBox.ItemsSource    = Enum.GetValues(typeof(BE.CasheRoutLevel));
     this.sizeOfDishComboBox.ItemsSource = Enum.GetValues(typeof(size));
 }
コード例 #8
0
 /// <summary>
 /// Constructor , initialize data , locking button
 /// </summary>
 public UpdateMenuOrderWindow()
 {
     InitializeComponent();
     order            = new Ordered_Dish();
     this.DataContext = order;
     bl = Factory_BL.GetBL();
     this.OrderListCombobox.ItemsSource = bl.ListOfOrder();
     this.DateTimetrueLabel.Content     = DateTime.Now;
     this.SearchButton.IsEnabled        = this.NextButton.IsEnabled = false;
     this.menuIDTextBox.IsEnabled       = this.PriceTextBox.IsEnabled = this.Nametextbox.IsEnabled = ListOfDishCombobox.IsEnabled = false;
     this.quantityTextBox.IsEnabled     = this.SearchButton.IsEnabled = false;
 }
コード例 #9
0
 /// <summary>
 /// Constructor , initialize data
 /// </summary>
 public UpdateBranch()
 {
     InitializeComponent();
     branch           = new Branch();
     this.DataContext = branch;
     bl = Factory_BL.GetBL();
     // loading data
     this.ListBranch.ItemsSource            = bl.ListOfBranch();
     this.cashroutLevelComboBox.ItemsSource = Enum.GetValues(typeof(BE.CasheRoutLevel));
     // lock all the button
     this.branchNameTextBox.IsEnabled = branchAddressTextBox.IsEnabled = branchNumberTelephoneTextBox.IsEnabled = nameInchargeTextBox.IsEnabled = numberOfWorkerTextBox.IsEnabled = numberDeliveryManAvailabeTextBox.IsEnabled = cashroutLevelComboBox.IsEnabled = false;
 }
コード例 #10
0
 /// <summary>
 /// Constructor , initialize data, locking button
 /// </summary>
 /// <param name="branch"></param>
 public MenuOrderWindow(int branch)
 {
     InitializeComponent();
     this.Branch      = branch;
     order            = new Ordered_Dish();
     this.DataContext = order;
     bl = Factory_BL.GetBL();
     this.NumberOrderLabel.Content       = bl.ListOfOrder().Last().OrderNumber;
     this.DateTimetrueLabel.Content      = DateTime.Now;
     this.ListOfDishCombobox.ItemsSource = bl.ByCashRoutonly(bl.ListOfOrder().Last().choice);
     this.SearchButton.IsEnabled         = this.NextButton.IsEnabled = false;
     this.menuIDTextBox.Text             = this.PriceTextBox.Text = this.quantityTextBox.Text = Nametextbox.Text = "";
 }