protected void LoadData(int pageIndex)
 {
     var search = new AssetsupplierSearch();
     search.Suppliername = txtSrchSuppliername.Text;
     int recordCount = 0;
     var list = AssetsupplierService.RetrieveAssetsuppliersPaging(search, pageIndex, pcData.PageSize, out recordCount);
     gvSuppliers.DataSource = list;
     gvSuppliers.DataBind();
     pcData.RecordCount = recordCount;
     pcData.CurrentIndex = pageIndex;
 }
 public List<Assetsupplier> RetrieveAssetsuppliersPaging(AssetsupplierSearch info,int pageIndex, int pageSize,out int count)
 {
     try
     {
         StringBuilder sqlCommand = new StringBuilder(@" SELECT ""ASSETSUPPLIER"".""SUPPLIERID"",""ASSETSUPPLIER"".""SUPPLIERNAME""
              FROM ""ASSETSUPPLIER""
              WHERE 1=1");
         if (!string.IsNullOrEmpty(info.Supplierid))
         {
             this.Database.AddInParameter(":Supplierid", "%"+info.Supplierid+"%");
             sqlCommand.AppendLine(@" AND ""ASSETSUPPLIER"".""SUPPLIERID"" LIKE :Supplierid");
         }
         if (!string.IsNullOrEmpty(info.Suppliername))
         {
             this.Database.AddInParameter(":Suppliername", "%"+info.Suppliername+"%");
             sqlCommand.AppendLine(@" AND ""ASSETSUPPLIER"".""SUPPLIERNAME"" LIKE :Suppliername");
         }
         sqlCommand.AppendLine(@"  ORDER BY ""ASSETSUPPLIER"".""SUPPLIERID"" ASC");
         return this.ExecuteReaderPaging<Assetsupplier>(sqlCommand.ToString(), pageIndex, pageSize, out count);
     }
     finally
     {
         this.Database.ClearParameter();
     }
 }
 public List<Assetsupplier> RetrieveAssetsuppliersPaging(AssetsupplierSearch info,int pageIndex, int pageSize,out int count)
 {
     return Management.RetrieveAssetsuppliersPaging(info,pageIndex,pageSize,out count);
 }
 protected void LoadSupplierData()
 {
     var search = new AssetsupplierSearch();
     int recordCount = 0;
     var list = AssetsupplierService.RetrieveAssetsuppliersPaging(search, 0, 10, out recordCount);
     list.Insert(0, new Assetsupplier() { Supplierid = string.Empty, Suppliername = "全部" });
     ddlSuppliers.DataTextField = "Suppliername";
     ddlSuppliers.DataValueField = "Supplierid";
     ddlSuppliers.DataSource = list;
     ddlSuppliers.DataBind();
 }