BExIS.Web.Shell.Areas.RPM.Controllers.DataAttributeController.deletAttribute C# (CSharp) Method

deletAttribute() public method

public deletAttribute ( long id, string name ) : System.Web.Mvc.ActionResult
id long
name string
return System.Web.Mvc.ActionResult
        public ActionResult deletAttribute(long id, string name)
        {
            if (id != 0)
            {
                DataContainerManager DAM = new DataContainerManager();
                DataAttribute dataAttribute = DAM.DataAttributeRepo.Get(id);
                if (dataAttribute != null)
                {
                    if (!attributeInUse(dataAttribute))
                    {

                        DAM.DeleteDataAttribute(dataAttribute);
                    }

                }
            }
            return RedirectToAction("AttributeManager");
        }