Ejemplo n.º 1
0
 public WmsAllocationInfo GetWmsAllocationInfoById(string Id)
 {
     using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
     {
         WmsAllocationInfo model = WmsAllocationInfoBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 public bool AddWmsAllocationInfo(WmsAllocationInfo mWmsAllocationInfo)
 {
     if (mWmsAllocationInfo == null)
     {
         return(false);
     }
     using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>())
     {
         return(WmsAllocationInfoBLL.Add(mWmsAllocationInfo));
     }
 }
Ejemplo n.º 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); }
     }
 }
Ejemplo n.º 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); }
     }
 }
Ejemplo n.º 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);
            }
        }