public List<Assetsetupdetail> RetrieveAssetsetupdetailsPaging(AssetsetupdetailSearch info,int pageIndex, int pageSize,out int count)
        {
            try
            {
                StringBuilder sqlCommand = new StringBuilder(@" SELECT ""ASSETSETUPDETAIL"".""DETAILID"",""ASSETSETUPDETAIL"".""SETUPID"",""ASSETSETUPDETAIL"".""ASSETNO"",""ASSETSETUPDETAIL"".""PLANSETUPDATE"",""ASSETSETUPDETAIL"".""ACTUALSETUPDATE"",
                     ""ASSETSETUPDETAIL"".""SETUPCONTENT""
                     ,c.StorageName,c.subcompanyname AS subcompanyname
                     FROM ""ASSETSETUPDETAIL""
                     INNER JOIN ""ASSETSETUPINFO"" ON ""ASSETSETUPDETAIL"".""SETUPID""=""ASSETSETUPINFO"".""SETUPID""
                     INNER JOIN  v_storage_address c on c.StorageTitle=ASSETSETUPINFO.STORAGETITLE and c.StorageId=ASSETSETUPINFO.STORAGEID
                     WHERE 1=1");
                if (!string.IsNullOrEmpty(info.Detailid))
                {
                    this.Database.AddInParameter(":Detailid",DbType.AnsiString,"%"+info.Detailid+"%");
                    sqlCommand.AppendLine(@" AND ""ASSETSETUPDETAIL"".""DETAILID"" LIKE :Detailid");
                }
                if (!string.IsNullOrEmpty(info.Setupid))
                {
                    this.Database.AddInParameter(":Setupid",DbType.AnsiString,"%"+info.Setupid+"%");
                    sqlCommand.AppendLine(@" AND ""ASSETSETUPDETAIL"".""SETUPID"" LIKE :Setupid");
                }
                if (!string.IsNullOrEmpty(info.Assetno))
                {
                    //this.Database.AddInParameter(":Assetno",DbType.AnsiString,"%"+info.Assetno+"%");
                    //sqlCommand.AppendLine(@" AND ""ASSETSETUPDETAIL"".""ASSETNO"" LIKE :Assetno");
                    this.Database.AddInParameter(":Assetno", DbType.AnsiString, info.Assetno );
                    sqlCommand.AppendLine(@" AND ""ASSETSETUPDETAIL"".""ASSETNO"" = :Assetno");
                }
                if (!string.IsNullOrEmpty(info.Setupcontent))
                {
                    this.Database.AddInParameter(":Setupcontent", "%"+info.Setupcontent+"%");
                    sqlCommand.AppendLine(@" AND ""ASSETSETUPDETAIL"".""SETUPCONTENT"" LIKE :Setupcontent");
                }

                sqlCommand.AppendLine(@"  ORDER BY ""ASSETSETUPDETAIL"".""DETAILID"" DESC");
                return this.ExecuteReaderPaging<Assetsetupdetail>(sqlCommand.ToString(), pageIndex, pageSize, out count);
            }
            finally
            {
                this.Database.ClearParameter();
            }
        }
 protected void LoadSetupData()
 {
     var search = new AssetsetupdetailSearch();
     search.Assetno = Assetno;//设备编号
     int recordCount = 0;
     var list = AssetsetupdetailService.RetrieveAssetsetupdetailsPaging(search, 0, 100, out recordCount);
     rptSetupList.DataSource = list;
     rptSetupList.DataBind();
 }
 public List<Assetsetupdetail> RetrieveAssetsetupdetailsPaging(AssetsetupdetailSearch info,int pageIndex, int pageSize,out int count)
 {
     return Management.RetrieveAssetsetupdetailsPaging(info,pageIndex,pageSize,out count);
 }