private void CreateListings()
        {
            agentEmail = (this.Tag as AgentWindow).currentAgentName;
            Classes.ListingManager listManager = new Classes.ListingManager();
            if (listManager.GetAddressID(currentAreaID, streetName, streetNo) == -1)
            {
                listManager.AddListingAddress(currentAreaID, streetName, streetNo);
            }
            addressID = listManager.GetAddressID(currentAreaID, streetName, streetNo);
            if (CB_Complex.IsChecked == true)
            {
                if (listManager.GetComplexID(complexName, addressID) == -1)
                {
                    listManager.AddListingComplex(complexName, addressID);
                }
                complexID = listManager.GetComplexID(complexName, addressID);
            }
            else
            {
                complexID = -1;
            }

            listManager.AddListingProperty(currentClientID, addressID, complexID, complexNo, bedrooms, bathrooms, garages, hasPool, plotSize, houseSize, propertyValue, description);
            propertyID = listManager.GetPropertyID(currentClientID);
            agentID    = listManager.GetAgentID(agentEmail);
            listManager.AddListing(propertyID, agentID, propertyPrice, isNegotiable, isSold, description);
        }
        private void CreateListings()
        {
            agentEmail = (this.Tag as AgentWindow).currentAgentName;
            Classes.ListingManager listManager = new Classes.ListingManager();
            listManager.AddListingAddress(currentAreaID, streetName, streetNo);
            addressID = listManager.GetAddressID(currentAreaID, streetName, streetNo);
            if (CB_Complex.IsChecked == true)
            {
                listManager.AddListingComplex(complexName, addressID);
                complexID = listManager.GetComplexID(complexName, addressID);
            }
            else
                complexID = -1;

            listManager.AddListingProperty(currentClientID, addressID, complexID, complexNo, bedrooms, bathrooms, garages, hasPool, plotSize, houseSize, propertyValue);
            propertyID = listManager.GetPropertyID(currentClientID);
            agentID = listManager.GetAgentID(agentEmail);
            listManager.AddListing(propertyID, agentID, propertyPrice, isNegotiable, isSold);
        }