public FDIPostRawMaterial GetFDIPostRawMaterialById(string Id) { using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { FDIPostRawMaterial model = FDIPostRawMaterialBLL.GetFirstOrDefault(Id); return(model); } }
public int GetFDIPostRawMaterialCount(string sWhere) { Expression <Func <FDIPostRawMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostRawMaterial>(sWhere); using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { return(FDIPostRawMaterialBLL.GetCount(whereLamda)); } }
public List <FDIPostRawMaterial> GetFDIPostRawMaterials(string sWhere) { Expression <Func <FDIPostRawMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostRawMaterial>(sWhere); using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { List <FDIPostRawMaterial> models = FDIPostRawMaterialBLL.GetModels(whereLamda); return(models); } }
public bool AddFDIPostRawMaterial(FDIPostRawMaterial mFDIPostRawMaterial) { if (mFDIPostRawMaterial == null) { return(false); } using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { return(FDIPostRawMaterialBLL.Add(mFDIPostRawMaterial)); } }
public bool DelFDIPostRawMaterial(string Id) { using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { try { FDIPostRawMaterial item = FDIPostRawMaterialBLL.GetFirstOrDefault(Id); return(FDIPostRawMaterialBLL.Delete(item)); } catch { return(false); } } }
public bool DelFDIPostRawMaterials(string[] Ids) { using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { try { List <FDIPostRawMaterial> entitys = new List <FDIPostRawMaterial>(); foreach (string id in Ids) { FDIPostRawMaterial item = FDIPostRawMaterialBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FDIPostRawMaterialBLL.Delete(entitys)); } catch { return(false); } } }
public List <FDIPostRawMaterial> GetFDIPostRawMaterialByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <FDIPostRawMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostRawMaterial>(sWhere); using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>()) { List <FDIPostRawMaterial> models = FDIPostRawMaterialBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }