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