public FDIGetMaterial GetFDIGetMaterialById(string Id) { using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { FDIGetMaterial model = FDIGetMaterialBLL.GetFirstOrDefault(Id); return(model); } }
public int GetFDIGetMaterialCount(string sWhere) { Expression <Func <FDIGetMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIGetMaterial>(sWhere); using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { return(FDIGetMaterialBLL.GetCount(whereLamda)); } }
public List <FDIGetMaterial> GetFDIGetMaterials(string sWhere) { Expression <Func <FDIGetMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIGetMaterial>(sWhere); using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { List <FDIGetMaterial> models = FDIGetMaterialBLL.GetModels(whereLamda); return(models); } }
public bool AddFDIGetMaterial(FDIGetMaterial mFDIGetMaterial) { if (mFDIGetMaterial == null) { return(false); } using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { return(FDIGetMaterialBLL.Add(mFDIGetMaterial)); } }
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); } } }
public List <FDIGetMaterial> GetFDIGetMaterialByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <FDIGetMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIGetMaterial>(sWhere); using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>()) { List <FDIGetMaterial> models = FDIGetMaterialBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }