예제 #1
0
        public ActionResult Edit(int id)
        {
            try
            {
                ViewBag.Saved = false;
                Models.PropertyFeatureModel mbt = new PropertyFeatureModel()
                {
                    PropertyFeatureId = 0
                };

                CLayer.PropertyFeature pt = BLayer.PropertyFeature.Get(id);

                if (pt != null)
                {
                    mbt = new PropertyFeatureModel()
                    {
                        PropertyFeatureId = pt.PropertyFeatureId, Title = pt.Title, Style = pt.Style, Showfeatures = pt.Showfeatures
                    }
                }
                ;

                return(PartialView("_Edit", mbt));
            }
            catch (Exception ex)
            {
                Common.LogHandler.HandleError(ex);
                return(Redirect("~/Admin/ErrorPage"));
            }
        }
예제 #2
0
        // [HttpPost]
        public ActionResult AddPropertyValue(PropertyFeatureModel propertyFeature, int[] Value, int[] PropertyFeatureId)
        {
            PropertyValues propertyValues = new PropertyValues();

            propertyValues = AutoMapper.Mapper.Map <PropertyFeatureModel, PropertyValues>(propertyFeature);
            propertyBL.AddPropertyValue(propertyValues, Value, PropertyFeatureId);
            return(RedirectToAction("DisplayPropertyDetails", "Property"));
        }
예제 #3
0
        public ActionResult AddFeature(int propertyId, int propertyTypeId)
        {
            //Property property = TempData["TypeId"] as Property;
            List <PropertyFeature> propertyFeatures = propertyBL.GetFeature(propertyTypeId);
            //ArrayList featureId = new ArrayList();
            PropertyFeatureModel model = new PropertyFeatureModel();

            ViewBag.propertyFeature = propertyFeatures;
            model.PropertyId        = propertyId;
            return(this.View(model));
        }