示例#1
0
        public ActionResult AddProperty(int catid)
        {
            List <CategoryDTO> categories =
                categoryManager.GetAll();
            List <string> enums = new List <string>();

            foreach (var i in Enum.GetNames(typeof(PropertyType)))
            {
                enums.Add(i);
            }
            PropertyViewDTO custom_model = new PropertyViewDTO()
            {
                enums = enums, categories = categories, CategoryId = catid
            };

            return(View(custom_model));
        }
示例#2
0
        public ActionResult UpdateProperty(int catid, int propid)
        {
            var properties = propertyManager.GetAll().Select(c => c).ToList();
            var categories =
                categoryManager.GetAll();
            var enums = new List <string>();

            foreach (var i in Enum.GetNames(typeof(PropertyType)))
            {
                enums.Add(i);
            }

            PropertyViewDTO custom_model = new PropertyViewDTO()
            {
                enums = enums, categories = categories, properties = properties, CategoryId = catid, PropertyId = propid
            };

            return(View(custom_model));
        }