Ejemplo n.º 1
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Id">关键字段</param>
 /// <returns>是否成功</returns>
 //[WebMethod(Description = "删除TmsToolsType")]
 public bool DelTmsToolsType(string Id)
 {
     using (ITmsToolsTypeBLL TmsToolsTypeBLL = BLLContainer.Resolve <ITmsToolsTypeBLL>())
     {
         try
         {
             TmsToolsType item = TmsToolsTypeBLL.GetFirstOrDefault(Id);
             return(TmsToolsTypeBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Ids">关键字段数组</param>
 /// <returns>是否成功</returns>
 //[WebMethod(Description = "删除(多个)TmsToolsType")]
 public bool DelTmsToolsTypes(string[] Ids)
 {
     using (ITmsToolsTypeBLL TmsToolsTypeBLL = BLLContainer.Resolve <ITmsToolsTypeBLL>())
     {
         try
         {
             List <TmsToolsType> entitys = new List <TmsToolsType>();
             foreach (string id in Ids)
             {
                 TmsToolsType item = TmsToolsTypeBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(TmsToolsTypeBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }