Esempio n. 1
0
 public RsWorkCenter GetRsWorkCenterById(string Id)
 {
     using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>())
     {
         RsWorkCenter model = RsWorkCenterBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Esempio n. 2
0
 public bool AddRsWorkCenter(RsWorkCenter mRsWorkCenter)
 {
     if (mRsWorkCenter == null)
     {
         return(false);
     }
     using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>())
     {
         return(RsWorkCenterBLL.Add(mRsWorkCenter));
     }
 }
Esempio n. 3
0
 public bool DelRsWorkCenter(string Id)
 {
     using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>())
     {
         try
         {
             RsWorkCenter item = RsWorkCenterBLL.GetFirstOrDefault(Id);
             return(RsWorkCenterBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Esempio n. 4
0
 public bool DelRsWorkCenters(string[] Ids)
 {
     using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>())
     {
         try
         {
             List <RsWorkCenter> entitys = new List <RsWorkCenter>();
             foreach (string id in Ids)
             {
                 RsWorkCenter item = RsWorkCenterBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsWorkCenterBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }