Exemple #1
0
        public ActionResult Delete(Guid id)
        {
            var relevance = new List<object>()
            {
                new StatusMessageForDeleteOperation<Person>("当前类型已经被人员数据引用,不能删除。", x=>x.JobLevel.ID==id),
            };

            var deleteStatus = new DeleteStatus();
            BusinessEntityComponentsFactory.SetDeleteStatus<JobLevel>(id, deleteStatus, relevance);
            var actionDeleteStatus = new DeleteActionStatus();
            actionDeleteStatus.IsOK = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex = "1";
            actionDeleteStatus.TypeID = "";

            return Json(actionDeleteStatus);
        }
Exemple #2
0
        public ActionResult Delete(Guid id)
        {
            var relevance = new List <object>()
            {
                new StatusMessageForDeleteOperation <Person>("当前类型已经被人员数据引用,不能删除。", x => x.JobLevel.ID == id),
            };

            var deleteStatus = new DeleteStatus();

            BusinessEntityComponentsFactory.SetDeleteStatus <JobLevel>(id, deleteStatus, relevance);
            var actionDeleteStatus = new DeleteActionStatus();

            actionDeleteStatus.IsOK         = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex    = "1";
            actionDeleteStatus.TypeID       = "";

            return(Json(actionDeleteStatus));
        }
        public ActionResult Delete(Guid id)
        {
            var bo = _Service.GetSingle(id);
            var relevance = new List<object>()
            {
                new StatusMessageForDeleteOperation<SystemWorkPlace>("当前工作区已经包含有内部使用的数据,不能删除。",bo.SystemWorkSections.Count),
            };

            var deleteStatus = new DeleteStatus();
            BusinessEntityComponentsFactory.SetDeleteStatus<SystemWorkPlace>(id, deleteStatus, relevance);

            var actionDeleteStatus = new DeleteActionStatus();
            actionDeleteStatus.IsOK = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex = "1";
            actionDeleteStatus.TypeID = "";

            return Json(actionDeleteStatus);
        }
Exemple #4
0
        public ActionResult Delete(Guid id)
        {
            var bo        = _Service.GetSingle(id);
            var relevance = new List <object>()
            {
                new StatusMessageForDeleteOperation <SystemWorkPlace>("当前工作区已经包含有内部使用的数据,不能删除。", bo.SystemWorkSections.Count),
            };

            var deleteStatus = new DeleteStatus();

            BusinessEntityComponentsFactory.SetDeleteStatus <SystemWorkPlace>(id, deleteStatus, relevance);

            var actionDeleteStatus = new DeleteActionStatus();

            actionDeleteStatus.IsOK         = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex    = "1";
            actionDeleteStatus.TypeID       = "";

            return(Json(actionDeleteStatus));
        }
        public ActionResult Delete(Guid id)
        {
            var typeID = _Service.GetSingle(id).ParentDapartment.ID.ToString();

            // 下面的删除管理条件需要根据各个实体的业务逻辑进行定义的
            var relevance = new List<object>()
            {
                new StatusMessageForDeleteOperation<Department>("当前部门已经被其它部门作为上级部门使用,不能删除。",x=>x.ParentDapartment.ID == id),
            };
            var deleteStatus = new DeleteStatus();
            BusinessEntityComponentsFactory.SetDeleteStatus<Department>(id, deleteStatus, relevance);

            var actionDeleteStatus = new DeleteActionStatus();
            actionDeleteStatus.IsOK = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex = "1";
            actionDeleteStatus.TypeID = typeID;
            actionDeleteStatus.ExtenssionFunctionString = "RefreshTreeView"; // 约定数据持久化之后,除了执行返回列表的方法外,还需要执行的刷新导航树的另外的方法

            return Json(actionDeleteStatus);
        }
Exemple #6
0
        public ActionResult Delete(Guid id)
        {
            var typeID = _Service.GetSingle(id).Department.ID.ToString();

            // 下面的删除管理条件需要根据各个实体的业务逻辑进行定义的
            var relevance = new List <object>()
            {
                new StatusMessageForDeleteOperation <ApplicationUser>("当前人员数据已经在系统用户中关联使用,不能删除。", x => x.Person.ID == id),
            };
            var deleteStatus = new DeleteStatus();

            BusinessEntityComponentsFactory.SetDeleteStatus <Person>(id, deleteStatus, relevance);

            var actionDeleteStatus = new DeleteActionStatus();

            actionDeleteStatus.IsOK         = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex    = "1";
            actionDeleteStatus.TypeID       = typeID;

            return(Json(actionDeleteStatus));
        }
Exemple #7
0
        public ActionResult Delete(Guid id)
        {
            var typeID = _Service.GetSingle(id).ParentDapartment.ID.ToString();

            // 下面的删除管理条件需要根据各个实体的业务逻辑进行定义的
            var relevance = new List <object>()
            {
                new StatusMessageForDeleteOperation <Department>("当前部门已经被其它部门作为上级部门使用,不能删除。", x => x.ParentDapartment.ID == id),
            };
            var deleteStatus = new DeleteStatus();

            BusinessEntityComponentsFactory.SetDeleteStatus <Department>(id, deleteStatus, relevance);

            var actionDeleteStatus = new DeleteActionStatus();

            actionDeleteStatus.IsOK                     = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage             = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex                = "1";
            actionDeleteStatus.TypeID                   = typeID;
            actionDeleteStatus.ExtenssionFunctionString = "RefreshTreeView"; // 约定数据持久化之后,除了执行返回列表的方法外,还需要执行的刷新导航树的另外的方法

            return(Json(actionDeleteStatus));
        }
Exemple #8
0
        public ActionResult Delete(Guid id)
        {
            var typeID = _Service.GetSingle(id).Department.ID.ToString();

            // 下面的删除管理条件需要根据各个实体的业务逻辑进行定义的
            var relevance = new List<object>()
            {
                new StatusMessageForDeleteOperation<ApplicationUser>("当前人员数据已经在系统用户中关联使用,不能删除。",x=>x.Person.ID == id),
            };
            var deleteStatus = new DeleteStatus();
            BusinessEntityComponentsFactory.SetDeleteStatus<Person>(id, deleteStatus, relevance);

            var actionDeleteStatus = new DeleteActionStatus();
            actionDeleteStatus.IsOK = deleteStatus.SDSM[0].OperationStatus;
            actionDeleteStatus.ErrorMassage = deleteStatus.SDSM[0].OperationMessage;
            actionDeleteStatus.PageIndex = "1";
            actionDeleteStatus.TypeID = typeID;

            return Json(actionDeleteStatus);
        }