Ejemplo n.º 1
0
        public NewCaseStepDetails(NewCaseDropIn baseView, Case cCase)
            : base(cCase)
        {
            InitializeComponent();

            if (cCase != null)
            {
                var lastRating = CaseController.Instance.GetLastRating();
                stbSystemRating.Text            = lastRating.SystemValue.ToString();
                stbDetailsRating.Text           = lastRating.EstateAgentValue.ToString();
                stbDetailsPublicEvaluation.Text = cCase.PublicRating.ToString();
                stbDetailsPrice.Text            = cCase.NewestAskingPrice.ToString();

                stbDetailsDescription.Text = cCase.Description;

                foreach (var picture in CaseController.Instance.GetPictures())
                {
                    Image image = Image.FromFile(picture.Location);
                    clsPictures.AddControl(new DetailImage(this, image, picture));
                }

                foreach (var document in CaseController.Instance.GetDocuments())
                {
                    clsDocuments.AddControl(new DetailDocument(this, document));
                }
            }
        }
Ejemplo n.º 2
0
        public NewCaseStepEndCase(NewCaseDropIn baseView, Case cCase) : base(cCase)
        {
            this.baseView = baseView;

            InitializeComponent();

            BuyerSearchFinish(cCase.Buyer);

            SetSellerFieldsEnabled(buyer != null);

            UpdateStatusLabel();
        }
Ejemplo n.º 3
0
        public NewCaseStepSeller(NewCaseDropIn baseView, Case cCase)
            : base(cCase)
        {
            this.baseView = baseView;

            InitializeComponent();

            if (cCase != null)
            {
                SetSellerFields(cCase.Seller);
                UpdateEstateAgent(cCase.EstateAgent);
            }
            else
            {
                UpdateEstateAgent(baseView.baseForm.DefaultEstateAgent);
            }
        }
Ejemplo n.º 4
0
        public NewCaseStepProperty(NewCaseDropIn baseView, Case cCase) : base(cCase)
        {
            InitializeComponent();

            foreach (var propertyType in PropertyTypeController.Instance.GetPropertyTypes())
            {
                cboPropertyType.Items.Add(propertyType);
                cboPropertyType.DisplayMember = "Description";
            }

            if (cCase != null)
            {
                cboPropertyType.SelectedItem = cCase.PropertyType;
                stbPropertyArea.Text         = cCase.LivingArea.ToString();
                stbPropertyBasement.Text     = cCase.BasementArea.ToString();
                stbPropertyBuildYear.Text    = cCase.BuiltYear.ToString();
                stbPropertyEnergyMark.Text   = cCase.EnergyClassification;
                stbPropertyFloors.Text       = cCase.Floors.ToString();
                stbPropertyRooms.Text        = cCase.Rooms.ToString();
                stbPropertyBedrooms.Text     = cCase.Bedrooms.ToString();
                stbPropertyBathrooms.Text    = cCase.Bathrooms.ToString();
                stbPropertyToilets.Text      = cCase.Toilets.ToString();

                var distances = CaseController.Instance.GetDistanceTos(cCase.Id);
                foreach (var distance in distances)
                {
                    if (distance.Type == DistanceToSystemType.Shopping.ToString())
                    {
                        disShopping = distance;
                        stbDistanceToShopping.Text = distance.Distance.ToString();
                    }
                    else if (distance.Type == DistanceToSystemType.School.ToString())
                    {
                        disSchool = distance;
                        stbDistanceToSchool.Text = distance.Distance.ToString();
                    }
                    else if (distance.Type == DistanceToSystemType.Center.ToString())
                    {
                        disCenter = distance;
                        stbDistanceToCenter.Text = distance.Distance.ToString();
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public NewCaseStepLot(NewCaseDropIn baseView, Case cCase) : base(cCase)
        {
            this.baseView = baseView;
            InitializeComponent();

            if (cCase != null)
            {
                stbLotNumber.Text            = cCase.LandRegistryNumber;
                stbLotAddress.Text           = cCase.Address;
                stbLotZipCode.Text           = cCase.City.ZipCode.ToString();
                cboNeighborhood.SelectedItem = cCase.Neighborhood;
                stbLotValue.Text             = cCase.LandValue.ToString();
                stbLotArea.Text       = cCase.GroundArea.ToString();
                stbLotBuildArea.Text  = cCase.BuiltArea.ToString();
                stbLotGarageArea.Text = cCase.GarageArea.ToString();
                stbLotView.Text       = cCase.View.ToString();
            }

            cboNeighborhood.DisplayMember = "DisplayName";
        }