예제 #1
0
 public FDIGetMaterial GetFDIGetMaterialById(string Id)
 {
     using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
     {
         FDIGetMaterial model = FDIGetMaterialBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
예제 #2
0
        public int GetFDIGetMaterialCount(string sWhere)
        {
            Expression <Func <FDIGetMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIGetMaterial>(sWhere);

            using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
            {
                return(FDIGetMaterialBLL.GetCount(whereLamda));
            }
        }
예제 #3
0
        public List <FDIGetMaterial> GetFDIGetMaterials(string sWhere)
        {
            Expression <Func <FDIGetMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIGetMaterial>(sWhere);

            using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
            {
                List <FDIGetMaterial> models = FDIGetMaterialBLL.GetModels(whereLamda);
                return(models);
            }
        }
예제 #4
0
 public bool AddFDIGetMaterial(FDIGetMaterial mFDIGetMaterial)
 {
     if (mFDIGetMaterial == null)
     {
         return(false);
     }
     using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
     {
         return(FDIGetMaterialBLL.Add(mFDIGetMaterial));
     }
 }
예제 #5
0
 public bool DelFDIGetMaterial(string Id)
 {
     using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
     {
         try
         {
             FDIGetMaterial item = FDIGetMaterialBLL.GetFirstOrDefault(Id);
             return(FDIGetMaterialBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
예제 #6
0
 public bool DelFDIGetMaterials(string[] Ids)
 {
     using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
     {
         try
         {
             List <FDIGetMaterial> entitys = new List <FDIGetMaterial>();
             foreach (string id in Ids)
             {
                 FDIGetMaterial item = FDIGetMaterialBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(FDIGetMaterialBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
예제 #7
0
        public List <FDIGetMaterial> GetFDIGetMaterialByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (IFDIGetMaterialBLL FDIGetMaterialBLL = BLLContainer.Resolve <IFDIGetMaterialBLL>())
            {
                List <FDIGetMaterial> models = FDIGetMaterialBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }