예제 #1
0
 public FmsActionControl GetFmsActionControlById(string Id)
 {
     using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>())
     {
         FmsActionControl model = FmsActionControlBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
예제 #2
0
        public int GetFmsActionControlCount(string sWhere)
        {
            Expression <Func <FmsActionControl, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsActionControl>(sWhere);

            using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>())
            {
                return(FmsActionControlBLL.GetCount(whereLamda));
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
 public bool AddFmsActionControl(FmsActionControl mFmsActionControl)
 {
     if (mFmsActionControl == null)
     {
         return(false);
     }
     using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>())
     {
         return(FmsActionControlBLL.Add(mFmsActionControl));
     }
 }
예제 #5
0
 public bool DelFmsActionControl(string Id)
 {
     using (IFmsActionControlBLL FmsActionControlBLL = BLLContainer.Resolve <IFmsActionControlBLL>())
     {
         try
         {
             FmsActionControl item = FmsActionControlBLL.GetFirstOrDefault(Id);
             return(FmsActionControlBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
예제 #6
0
 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); }
     }
 }
예제 #7
0
        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);
            }
        }