public FmsAssetCommParam GetFmsAssetCommParamById(string Id) { using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { FmsAssetCommParam model = FmsAssetCommParamBLL.GetFirstOrDefault(Id); return(model); } }
public int GetFmsAssetCommParamCount(string sWhere) { Expression <Func <FmsAssetCommParam, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsAssetCommParam>(sWhere); using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { return(FmsAssetCommParamBLL.GetCount(whereLamda)); } }
public List <FmsAssetCommParam> GetFmsAssetCommParams([FromBody] string sWhere) { Expression <Func <FmsAssetCommParam, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsAssetCommParam>(sWhere); using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { List <FmsAssetCommParam> models = FmsAssetCommParamBLL.GetModels(whereLamda); return(models); } }
public bool AddFmsAssetCommParam(FmsAssetCommParam mFmsAssetCommParam) { if (mFmsAssetCommParam == null) { return(false); } using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { return(FmsAssetCommParamBLL.Add(mFmsAssetCommParam)); } }
public bool DelFmsAssetCommParam(string Id) { using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { try { FmsAssetCommParam item = FmsAssetCommParamBLL.GetFirstOrDefault(Id); return(FmsAssetCommParamBLL.Delete(item)); } catch { return(false); } } }
public bool DelFmsAssetCommParams(string[] Ids) { using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { try { List <FmsAssetCommParam> entitys = new List <FmsAssetCommParam>(); foreach (string id in Ids) { FmsAssetCommParam item = FmsAssetCommParamBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FmsAssetCommParamBLL.Delete(entitys)); } catch { return(false); } } }
public List <FmsAssetCommParam> GetFmsAssetCommParamByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <FmsAssetCommParam, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsAssetCommParam>(sWhere); using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>()) { List <FmsAssetCommParam> models = FmsAssetCommParamBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }