예제 #1
0
 public WmsAllocationInfo GetWmsAllocationInfoById(string Id)
 {
     using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
     {
         WmsAllocationInfo model = WmsAllocationInfoBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
예제 #2
0
        public int GetWmsAllocationInfoCount(string sWhere)
        {
            Expression <Func <WmsAllocationInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <WmsAllocationInfo>(sWhere);

            using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
            {
                return(WmsAllocationInfoBLL.GetCount(whereLamda));
            }
        }
예제 #3
0
        public List <WmsAllocationInfo> GetWmsAllocationInfos([FromBody] string sWhere)
        {
            Expression <Func <WmsAllocationInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <WmsAllocationInfo>(sWhere);

            using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
            {
                List <WmsAllocationInfo> models = WmsAllocationInfoBLL.GetModels(whereLamda);
                return(models);
            }
        }
예제 #4
0
 public bool AddWmsAllocationInfo(WmsAllocationInfo mWmsAllocationInfo)
 {
     if (mWmsAllocationInfo == null)
     {
         return(false);
     }
     using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
     {
         return(WmsAllocationInfoBLL.Add(mWmsAllocationInfo));
     }
 }
예제 #5
0
 public bool DelWmsAllocationInfo(string Id)
 {
     using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
     {
         try
         {
             WmsAllocationInfo item = WmsAllocationInfoBLL.GetFirstOrDefault(Id);
             return(WmsAllocationInfoBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
예제 #6
0
 public bool DelWmsAllocationInfos(string[] Ids)
 {
     using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
     {
         try
         {
             List <WmsAllocationInfo> entitys = new List <WmsAllocationInfo>();
             foreach (string id in Ids)
             {
                 WmsAllocationInfo item = WmsAllocationInfoBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(WmsAllocationInfoBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
예제 #7
0
        public List <WmsAllocationInfo> GetWmsAllocationInfoByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

            if (string.IsNullOrEmpty(orderField))
            {
                orderStr = "CREATION_DATE";
            }
            else
            {
                orderStr = orderField;
            }
            Expression <Func <WmsAllocationInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <WmsAllocationInfo>(sWhere);

            using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
            {
                List <WmsAllocationInfo> models = WmsAllocationInfoBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }