コード例 #1
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Id">关键字段</param>
 /// <returns>是否成功</returns>
 public bool DelRsMaintainRecord(string Id)
 {
     using (IRsMaintainRecordBLL RsMaintainRecordBLL = BLLContainer.Resolve <IRsMaintainRecordBLL>())
     {
         try
         {
             RsMaintainRecord item = RsMaintainRecordBLL.GetFirstOrDefault(Id);
             return(RsMaintainRecordBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
コード例 #2
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Ids">关键字段数组</param>
 /// <returns>是否成功</returns>
 public bool DelRsMaintainRecords(string[] Ids)
 {
     using (IRsMaintainRecordBLL RsMaintainRecordBLL = BLLContainer.Resolve <IRsMaintainRecordBLL>())
     {
         try
         {
             List <RsMaintainRecord> entitys = new List <RsMaintainRecord>();
             foreach (string id in Ids)
             {
                 RsMaintainRecord item = RsMaintainRecordBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsMaintainRecordBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }