| | |
| | | /// <summary> |
| | | /// 图表关联 |
| | | ///</summary> |
| | | public class PhartDiagramRelation :BaseDAL_Sorter<Entity.PhartDiagramRelation> ,IPhartDiagramRelation |
| | | public class PhartDiagramRelation : BaseDAL_Sorter<Entity.PhartDiagramRelation>, IPhartDiagramRelation |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return PhartRelation.ConfigHelper.PostgreSqlConnectionConfig; } |
| | | } |
| | | |
| | | { |
| | | get { return PhartRelation.ConfigHelper.PostgreSqlConnectionConfig; } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 插入拓展 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新 OtherName |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | |
| | | //public override bool DeleteByID(long ID) |
| | | //{ |
| | | // using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | // { |
| | | // try |
| | | // { |
| | | // var entity = db.Queryable<Entity.PhartDiagramRelation>().Single(x => x.ID == ID); |
| | | // if (entity == null) |
| | | // return false; |
| | | // var list = db.Queryable<Entity.PhartDiagramRelation>().Where(x => x.DiagramID == entity.DiagramID); |
| | | // if (list != null && list.Count() > 1) |
| | | // { |
| | | // return base.DeleteByID(ID); |
| | | // } |
| | | // else |
| | | // { |
| | | // db.BeginTran(); |
| | | // var bol = db.Deleteable<Entity.PhartDiagramRelation>().Where(x => x.DiagramID == entity.DiagramID).ExecuteCommandHasChange(); |
| | | // if (!bol) |
| | | // { |
| | | // db.RollbackTran(); |
| | | // return false; |
| | | // } |
| | | |
| | | // bol = db.Deleteable<Yw.Entity.PhartDiagram>().Where(x => x.ID == entity.DiagramID).ExecuteCommandHasChange(); |
| | | // if (!bol) |
| | | // { |
| | | // db.RollbackTran(); |
| | | // return false; |
| | | // } |
| | | |
| | | // bol = db.Deleteable<Yw.Entity.PhartGraph>().Where(x => x.DiagramID == entity.DiagramID).ExecuteCommandHasChange(); |
| | | // db.CommitTran(); |
| | | // return true; |
| | | // } |
| | | // } |
| | | // catch |
| | | // { |
| | | // db.RollbackTran(); |
| | | // throw; |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |