public FDIGetMaterialInfo GetFDIGetMaterialInfoById(string Id) { using (IFDIGetMaterialInfoBLL FDIGetMaterialInfoBLL = BLLContainer.Resolve <IFDIGetMaterialInfoBLL>()) { FDIGetMaterialInfo model = FDIGetMaterialInfoBLL.GetFirstOrDefault(Id); return(model); } }
public bool AddFDIGetMaterialInfo(FDIGetMaterialInfo mFDIGetMaterialInfo) { if (mFDIGetMaterialInfo == null) { return(false); } using (IFDIGetMaterialInfoBLL FDIGetMaterialInfoBLL = BLLContainer.Resolve <IFDIGetMaterialInfoBLL>()) { return(FDIGetMaterialInfoBLL.Add(mFDIGetMaterialInfo)); } }
public bool DelFDIGetMaterialInfo(string Id) { using (IFDIGetMaterialInfoBLL FDIGetMaterialInfoBLL = BLLContainer.Resolve <IFDIGetMaterialInfoBLL>()) { try { FDIGetMaterialInfo item = FDIGetMaterialInfoBLL.GetFirstOrDefault(Id); return(FDIGetMaterialInfoBLL.Delete(item)); } catch { return(false); } } }
public bool DelFDIGetMaterialInfos(string[] Ids) { using (IFDIGetMaterialInfoBLL FDIGetMaterialInfoBLL = BLLContainer.Resolve <IFDIGetMaterialInfoBLL>()) { try { List <FDIGetMaterialInfo> entitys = new List <FDIGetMaterialInfo>(); foreach (string id in Ids) { FDIGetMaterialInfo item = FDIGetMaterialInfoBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FDIGetMaterialInfoBLL.Delete(entitys)); } catch { return(false); } } }