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