コード例 #1
0
ファイル: BaseDataDS.cs プロジェクト: locdht/MyVinaGerman
        public List <IndustryEntity> SearchIndustry(IndustrySearchEntity searchObject)
        {
            IBaseDataSvc channel = CreateChannel();
            var          result  = channel.SearchIndustry(searchObject);

            channel.Dispose();
            return(result);
        }
コード例 #2
0
ファイル: IndustryBL.cs プロジェクト: locdht/MyVinaGerman
 public List <IndustryEntity> SearchIndustry(IndustrySearchEntity searchObject)
 {
     //execute
     using (var db = VinaGerman.Database.VinagermanDatabase.GetDatabaseInstance())
     {
         try
         {
             db.OpenConnection();
             return(db.Resolve <IIndustryDB>().SearchIndustry(searchObject));
         }
         finally
         {
             db.CloseConnection();
         }
     }
 }
コード例 #3
0
ファイル: IndustryDB.cs プロジェクト: locdht/MyVinaGerman
        public List <IndustryEntity> SearchIndustry(IndustrySearchEntity searchObject)
        {
            List <IndustryEntity> result = null;
            string sqlStatement          = "SELECT " + Environment.NewLine +
                                           "Industry.IndustryId," + Environment.NewLine +
                                           "Industry.Description," + Environment.NewLine +
                                           "Industry.Deleted" + Environment.NewLine +
                                           "FROM Industry " + Environment.NewLine +
                                           "WHERE Deleted=0 " + Environment.NewLine;

            if (searchObject.SearchText != null && searchObject.SearchText.Length > 0)
            {
                sqlStatement += "AND (Description LIKE N'%" + searchObject.SearchText + "%')" + Environment.NewLine;
            }
            //execute
            result = Connection.Query <IndustryEntity>(sqlStatement, null, Transaction).ToList();
            return(result);
        }
コード例 #4
0
 public List <IndustryEntity> SearchIndustry(IndustrySearchEntity searchObject)
 {
     return(Factory.Resolve <IIndustryBL>().SearchIndustry(searchObject));
 }