예제 #1
0
        public ActionResult PackageTypeGridViewPartialDelete(System.Int32 PackagingTypeID)
        {
            if (PackagingTypeID >= 0)
            {
                try
                {
                    BusinessLogicLayer.Components.PPM.PackagingTypeLogic logic = new BusinessLogicLayer.Components.PPM.PackagingTypeLogic();
                    if (!logic.HasDependencies(PackagingTypeID))
                    {
                        Qiyas.BusinessLogicLayer.Entity.PPM.PackagingType package = new BusinessLogicLayer.Entity.PPM.PackagingType(PackagingTypeID);
                        package.Delete();
                    }
                    else
                    {
                        ViewData["EditError"] = Resources.MainResource.CityHasAssociatedData;
                    }
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            var model = new BusinessLogicLayer.Components.PPM.PackagingTypeLogic().GetAll();

            return(PartialView("_PackageTypeGridViewPartial", model));
        }