public FmsActionControl GetFmsActionControlById(string Id) { using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { FmsActionControl model = FmsActionControlBLL.GetFirstOrDefault(Id); return(model); } }
public int GetFmsActionControlCount(string sWhere) { Expression <Func <FmsActionControl, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsActionControl>(sWhere); using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { return(FmsActionControlBLL.GetCount(whereLamda)); } }
public List <FmsActionControl> GetFmsActionControls([FromBody] string sWhere) { Expression <Func <FmsActionControl, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsActionControl>(sWhere); using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { List <FmsActionControl> models = FmsActionControlBLL.GetModels(whereLamda); return(models); } }
public bool AddFmsActionControl(FmsActionControl mFmsActionControl) { if (mFmsActionControl == null) { return(false); } using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { return(FmsActionControlBLL.Add(mFmsActionControl)); } }
public bool DelFmsActionControl(string Id) { using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { try { FmsActionControl item = FmsActionControlBLL.GetFirstOrDefault(Id); return(FmsActionControlBLL.Delete(item)); } catch { return(false); } } }
public bool DelFmsActionControls(string[] Ids) { using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { try { List <FmsActionControl> entitys = new List <FmsActionControl>(); foreach (string id in Ids) { FmsActionControl item = FmsActionControlBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FmsActionControlBLL.Delete(entitys)); } catch { return(false); } } }
public List <FmsActionControl> GetFmsActionControlByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <FmsActionControl, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsActionControl>(sWhere); using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>()) { List <FmsActionControl> models = FmsActionControlBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }