示例#1
0
 public FDIPostRawMaterial GetFDIPostRawMaterialById(string Id)
 {
     using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
     {
         FDIPostRawMaterial model = FDIPostRawMaterialBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
示例#2
0
        public int GetFDIPostRawMaterialCount(string sWhere)
        {
            Expression <Func <FDIPostRawMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostRawMaterial>(sWhere);

            using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
            {
                return(FDIPostRawMaterialBLL.GetCount(whereLamda));
            }
        }
示例#3
0
        public List <FDIPostRawMaterial> GetFDIPostRawMaterials(string sWhere)
        {
            Expression <Func <FDIPostRawMaterial, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <FDIPostRawMaterial>(sWhere);

            using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
            {
                List <FDIPostRawMaterial> models = FDIPostRawMaterialBLL.GetModels(whereLamda);
                return(models);
            }
        }
示例#4
0
 public bool AddFDIPostRawMaterial(FDIPostRawMaterial mFDIPostRawMaterial)
 {
     if (mFDIPostRawMaterial == null)
     {
         return(false);
     }
     using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
     {
         return(FDIPostRawMaterialBLL.Add(mFDIPostRawMaterial));
     }
 }
示例#5
0
 public bool DelFDIPostRawMaterial(string Id)
 {
     using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
     {
         try
         {
             FDIPostRawMaterial item = FDIPostRawMaterialBLL.GetFirstOrDefault(Id);
             return(FDIPostRawMaterialBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
示例#6
0
 public bool DelFDIPostRawMaterials(string[] Ids)
 {
     using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
     {
         try
         {
             List <FDIPostRawMaterial> entitys = new List <FDIPostRawMaterial>();
             foreach (string id in Ids)
             {
                 FDIPostRawMaterial item = FDIPostRawMaterialBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(FDIPostRawMaterialBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
示例#7
0
        public List <FDIPostRawMaterial> GetFDIPostRawMaterialByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (IFDIPostRawMaterialBLL FDIPostRawMaterialBLL = BLLContainer.Resolve <IFDIPostRawMaterialBLL>())
            {
                List <FDIPostRawMaterial> models = FDIPostRawMaterialBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }