Example #1
0
 /// <summary>
 /// 根据关键字段的值获取记录
 /// </summary>
 /// <param name="Id">关键字段的值</param>
 /// <returns>符合查询条件的记录</returns>
 public SysAppInfo GetSysAppInfoById(string Id)
 {
     using (ISysAppInfoBLL SysAppInfoBLL = BLLContainer.Resolve <ISysAppInfoBLL>())
     {
         SysAppInfo model = SysAppInfoBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Example #2
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); }
     }
 }
Example #3
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); }
     }
 }