Esempio n. 1
0
 public QmsTest GetQmsTestById(string Id)
 {
     using (IQmsTestBLL QmsTestBLL = BLLContainer.Resolve <IQmsTestBLL>())
     {
         QmsTest model = QmsTestBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Esempio n. 2
0
 public bool DelQmsTest(string Id)
 {
     using (IQmsTestBLL QmsTestBLL = BLLContainer.Resolve <IQmsTestBLL>())
     {
         try
         {
             QmsTest item = QmsTestBLL.GetFirstOrDefault(Id);
             return(QmsTestBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Esempio n. 3
0
 public bool DelQmsTests(string[] Ids)
 {
     using (IQmsTestBLL QmsTestBLL = BLLContainer.Resolve <IQmsTestBLL>())
     {
         try
         {
             List <QmsTest> entitys = new List <QmsTest>();
             foreach (string id in Ids)
             {
                 QmsTest item = QmsTestBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(QmsTestBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }