Exemplo n.º 1
0
 public FmsAssetCommParam GetFmsAssetCommParamById(string Id)
 {
     using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>())
     {
         FmsAssetCommParam model = FmsAssetCommParamBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Exemplo n.º 2
0
        public int GetFmsAssetCommParamCount(string sWhere)
        {
            Expression <Func <FmsAssetCommParam, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FmsAssetCommParam>(sWhere);

            using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>())
            {
                return(FmsAssetCommParamBLL.GetCount(whereLamda));
            }
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 public bool AddFmsAssetCommParam(FmsAssetCommParam mFmsAssetCommParam)
 {
     if (mFmsAssetCommParam == null)
     {
         return(false);
     }
     using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>())
     {
         return(FmsAssetCommParamBLL.Add(mFmsAssetCommParam));
     }
 }
Exemplo n.º 5
0
 public bool DelFmsAssetCommParam(string Id)
 {
     using (IFmsAssetCommParamBLL FmsAssetCommParamBLL = BLLContainer.Resolve <IFmsAssetCommParamBLL>())
     {
         try
         {
             FmsAssetCommParam item = FmsAssetCommParamBLL.GetFirstOrDefault(Id);
             return(FmsAssetCommParamBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Exemplo n.º 6
0
 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); }
     }
 }
Exemplo n.º 7
0
        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);
            }
        }