/// <summary> /// 删除工作日志 /// </summary> /// <param name="DataID"></param> /// <returns></returns> public bool DeleteData(String DataID) { bool succ = false; JConnect.GetConnect().BeginTrans(); try { List <SearchField> condition = new List <SearchField>(); condition.Add(new SearchField("LogID", DataID)); Tb_WorkLogDA da1 = new Tb_WorkLogDA(); da1.DeleteData(condition); condition.Clear(); condition.Add(new SearchField("ParentID", DataID)); Tb_WorkLogReadersDA da2 = new Tb_WorkLogReadersDA(); da2.DeleteData(condition); JConnect.GetConnect().CommitTrans(); succ = true; } catch (Exception err) { JConnect.GetConnect().RollBackTrans(); } return(succ); }
/// <summary> /// 根据条件删除数据 /// </summary> /// <param name="condition">删除数据条件</param> public void DeleteData(List <SearchField> condition) { try { Tb_WorkLogDA da1 = new Tb_WorkLogDA(); da1.DeleteData(condition); this.executeResultCount = da1.ExecuteResultCount; } catch (Exception err) { this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", ""); } }