Ejemplo n.º 1
0
 public DAAlarmRecord GetDAAlarmRecordById(string Id)
 {
     using (IDAAlarmRecordBLL DAAlarmRecordBLL = BLLContainer.Resolve <IDAAlarmRecordBLL>())
     {
         DAAlarmRecord model = DAAlarmRecordBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Ejemplo n.º 2
0
 public bool DelDAAlarmRecord(string Id)
 {
     using (IDAAlarmRecordBLL DAAlarmRecordBLL = BLLContainer.Resolve <IDAAlarmRecordBLL>())
     {
         try
         {
             DAAlarmRecord item = DAAlarmRecordBLL.GetFirstOrDefault(Id);
             return(DAAlarmRecordBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Ejemplo n.º 3
0
 public bool DelDAAlarmRecords(string[] Ids)
 {
     using (IDAAlarmRecordBLL DAAlarmRecordBLL = BLLContainer.Resolve <IDAAlarmRecordBLL>())
     {
         try
         {
             List <DAAlarmRecord> entitys = new List <DAAlarmRecord>();
             foreach (string id in Ids)
             {
                 DAAlarmRecord item = DAAlarmRecordBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(DAAlarmRecordBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }