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