/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Id">关键字段</param> /// <returns>是否成功</returns> public bool DelRsRoutingTools(string Id) { using (IRsRoutingToolsBLL RsRoutingToolsBLL = BLLContainer.Resolve <IRsRoutingToolsBLL>()) { try { RsRoutingTools item = RsRoutingToolsBLL.GetFirstOrDefault(Id); return(RsRoutingToolsBLL.Delete(item)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelRsRoutingToolss(string[] Ids) { using (IRsRoutingToolsBLL RsRoutingToolsBLL = BLLContainer.Resolve <IRsRoutingToolsBLL>()) { try { List <RsRoutingTools> entitys = new List <RsRoutingTools>(); foreach (string id in Ids) { RsRoutingTools item = RsRoutingToolsBLL.GetFirstOrDefault(id); entitys.Add(item); } return(RsRoutingToolsBLL.Delete(entitys)); } catch { return(false); } } }