public RsWorkCenter GetRsWorkCenterById(string Id) { using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>()) { RsWorkCenter model = RsWorkCenterBLL.GetFirstOrDefault(Id); return(model); } }
public bool AddRsWorkCenter(RsWorkCenter mRsWorkCenter) { if (mRsWorkCenter == null) { return(false); } using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>()) { return(RsWorkCenterBLL.Add(mRsWorkCenter)); } }
public bool DelRsWorkCenter(string Id) { using (IRsWorkCenterBLL RsWorkCenterBLL = BLLContainer.Resolve <IRsWorkCenterBLL>()) { try { RsWorkCenter item = RsWorkCenterBLL.GetFirstOrDefault(Id); return(RsWorkCenterBLL.Delete(item)); } catch { return(false); } } }
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); } } }