Beispiel #1
0
 public FDIPostSaleOrderBatch GetFDIPostSaleOrderBatchById(string Id)
 {
     using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
     {
         FDIPostSaleOrderBatch model = FDIPostSaleOrderBatchBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Beispiel #2
0
        public int GetFDIPostSaleOrderBatchCount(string sWhere)
        {
            Expression <Func <FDIPostSaleOrderBatch, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostSaleOrderBatch>(sWhere);

            using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
            {
                return(FDIPostSaleOrderBatchBLL.GetCount(whereLamda));
            }
        }
Beispiel #3
0
        public List <FDIPostSaleOrderBatch> GetFDIPostSaleOrderBatchs(string sWhere)
        {
            Expression <Func <FDIPostSaleOrderBatch, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostSaleOrderBatch>(sWhere);

            using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
            {
                List <FDIPostSaleOrderBatch> models = FDIPostSaleOrderBatchBLL.GetModels(whereLamda);
                return(models);
            }
        }
Beispiel #4
0
 public bool AddFDIPostSaleOrderBatch(FDIPostSaleOrderBatch mFDIPostSaleOrderBatch)
 {
     if (mFDIPostSaleOrderBatch == null)
     {
         return(false);
     }
     using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
     {
         return(FDIPostSaleOrderBatchBLL.Add(mFDIPostSaleOrderBatch));
     }
 }
Beispiel #5
0
 public bool DelFDIPostSaleOrderBatch(string Id)
 {
     using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
     {
         try
         {
             FDIPostSaleOrderBatch item = FDIPostSaleOrderBatchBLL.GetFirstOrDefault(Id);
             return(FDIPostSaleOrderBatchBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Beispiel #6
0
 public bool DelFDIPostSaleOrderBatchs(string[] Ids)
 {
     using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
     {
         try
         {
             List <FDIPostSaleOrderBatch> entitys = new List <FDIPostSaleOrderBatch>();
             foreach (string id in Ids)
             {
                 FDIPostSaleOrderBatch item = FDIPostSaleOrderBatchBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(FDIPostSaleOrderBatchBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Beispiel #7
0
        public List <FDIPostSaleOrderBatch> GetFDIPostSaleOrderBatchByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>())
            {
                List <FDIPostSaleOrderBatch> models = FDIPostSaleOrderBatchBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }