Esempio n. 1
0
 /// <summary>
 /// 根据关键字段的值获取记录
 /// </summary>
 /// <param name="Id">关键字段的值</param>
 /// <returns>符合查询条件的记录</returns>
 public FmsStateResultRecord GetFmsStateResultRecordById(string Id)
 {
     using (IFmsStateResultRecordBLL FmsStateResultRecordBLL = BLLContainer.Resolve <IFmsStateResultRecordBLL>())
     {
         FmsStateResultRecord model = FmsStateResultRecordBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Id">关键字段</param>
 /// <returns>是否成功</returns>
 public bool DelFmsStateResultRecord(string Id)
 {
     using (IFmsStateResultRecordBLL FmsStateResultRecordBLL = BLLContainer.Resolve <IFmsStateResultRecordBLL>())
     {
         try
         {
             FmsStateResultRecord item = FmsStateResultRecordBLL.GetFirstOrDefault(Id);
             return(FmsStateResultRecordBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Ids">关键字段数组</param>
 /// <returns>是否成功</returns>
 public bool DelFmsStateResultRecords(string[] Ids)
 {
     using (IFmsStateResultRecordBLL FmsStateResultRecordBLL = BLLContainer.Resolve <IFmsStateResultRecordBLL>())
     {
         try
         {
             List <FmsStateResultRecord> entitys = new List <FmsStateResultRecord>();
             foreach (string id in Ids)
             {
                 FmsStateResultRecord item = FmsStateResultRecordBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(FmsStateResultRecordBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }