Exemplo n.º 1
0
        public ActionResult Edit(long Id)
        {
            AttributeGroupDTO attributeGroupDTO = _ManageAttributeGroup.GetAttributeGroupById(Id);

            Mapper.Initialize(c => c.CreateMap <AttributeGroupDTO, AttributeGroupVM>());
            AttributeGroupVM attributeGroup = Mapper.Map <AttributeGroupDTO, AttributeGroupVM>(attributeGroupDTO);

            return(View(attributeGroup));
        }
Exemplo n.º 2
0
        public ActionResult Add(AttributeGroupVM group)
        {
            if (ModelState.IsValid)
            {
                Mapper.Initialize(c => c.CreateMap <AttributeGroupVM, AttributeGroupDTO>());
                AttributeGroupDTO dto = Mapper.Map <AttributeGroupVM, AttributeGroupDTO>(group);
                OperationDetails  op  = _ManageAttributeGroup.AddAttributeGroup(dto);

                return(Json(new { Succedeed = op.Succedeed, message = op.Message }));
            }
            else
            {
                return(View(group));
            }
        }
Exemplo n.º 3
0
        public ActionResult Add()
        {
            AttributeGroupVM attributeGroup = new AttributeGroupVM();

            return(View(attributeGroup));
        }