Exemplo n.º 1
0
        private void deleteDependency(NpgsqlConnection conn, NpgsqlTransaction tran, String id)
        {
            DependencyDAO dependencyDAO = new DependencyDAO();

            List <Dependency> dependencies = dependencyDAO.selectByElementID(id);

            foreach (Dependency dependency in dependencies)
            {
                dependencyDAO.delete(conn, tran, dependency.element.getId(), dependency.dependencyElement.getId());
            }

            dependencies = dependencyDAO.selectByDependencyElementID(id);
            foreach (Dependency dependency in dependencies)
            {
                dependencyDAO.delete(conn, tran, dependency.element.getId(), dependency.dependencyElement.getId());
            }
        }
        public ActionResult <string> delete([FromForm] InsertedLink parameter)
        {
            DependencyDAO dependnecyDAO = new DependencyDAO();

            dependnecyDAO.delete(
                parameter.source,
                parameter.target
                );

            dependnecyDAO.update(
                parameter.source,
                parameter.target,
                parameter.source,
                parameter.target,
                parameter.dependencyTypeC,
                parameter.dependencyTypeR,
                parameter.dependencyTypeU,
                parameter.dependencyTypeD,
                parameter.remark
                );

            return(JsonConvert.SerializeObject(new { }));
        }