public FDIGetMaterial GetFDIGetMaterialById(string Id) { using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { FDIGetMaterial model = FDIGetMaterialBLL.GetFirstOrDefault(Id); return(model); } }
public bool DelFDIGetMaterial(string Id) { using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { try { FDIGetMaterial item = FDIGetMaterialBLL.GetFirstOrDefault(Id); return(FDIGetMaterialBLL.Delete(item)); } catch { return(false); } } }
public bool DelFDIGetMaterials(string[] Ids) { using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { try { List <FDIGetMaterial> entitys = new List <FDIGetMaterial>(); foreach (string id in Ids) { FDIGetMaterial item = FDIGetMaterialBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FDIGetMaterialBLL.Delete(entitys)); } catch { return(false); } } }