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