Exemple #1
0
        /**
         * Callback on selected item in list
         */
        private void ItemsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count > 0)
            {
                if (hasFieldsChanged())
                {
                    MessageBoxResult mbr = MessageBox.Show("You have some unsaved data. Do you want to wipe them all ? (cannot be undone)", "Confirm", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation);

                    if (mbr == MessageBoxResult.OK)
                    {
                        Address item = (e.AddedItems[0] as Address);
                        currentAddress = item;
                        addressManager.GetStreetNumber(currentAddress);
                        this.addressAdmin.UCAddress.Address = currentAddress;
                        this.addressAdmin.UCAddress.UCStreetNumber.StreetNumber = currentAddress.StreetNumber;
                        this.reloadList();
                        this.resetFieldsColors();
                    }
                }
                else
                {
                    Address item = (e.AddedItems[0] as Address);
                    currentAddress = item;
                    addressManager.GetStreetNumber(currentAddress);
                    this.addressAdmin.UCAddress.Address = currentAddress;
                    this.addressAdmin.UCAddress.UCStreetNumber.StreetNumber = currentAddress.StreetNumber;
                    this.resetFieldsColors();
                }
            }
        }
 public void LoadAddressPage(AddressAdmin addressAdmin)
 {
     this.addressAdmin = addressAdmin;
     InitLUCAddress();
     ResetAddress();
     InitActionsAddress();
     if (currentEmployee.Address != null)
     {
         currentAddress = currentEmployee.Address;
         mySqlAddressManager.GetStreetNumber(currentAddress);
         this.addressAdmin.UCAddress.Address = currentEmployee.Address;
         this.addressAdmin.UCAddress.UCStreetNumber.StreetNumber = currentEmployee.Address.StreetNumber;
     }
 }
Exemple #3
0
        private void AddressList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count > 0)
            {
                Address item = (e.AddedItems[0] as Address);

                MySQLAddressManager addressManager = new MySQLAddressManager();
                addressManager.GetStreetNumber(item);

                this.addressAdmin.UCAddress.Address = item;
                this.addressAdmin.UCAddress.UCStreetNumber.StreetNumber = item.StreetNumber;
            }
        }
Exemple #4
0
        private void GetCurrentZooAddressFull()
        {
            MySQLAddressManager addressManager = new MySQLAddressManager();

            addressManager.GetStreetNumber(currentZoo.Address);
        }