首页 新闻 会员 周边 捐助

ext.pagingtoolbar分页问题

0
悬赏园豆:15 [已解决问题] 解决于 2012-06-20 10:42

数据从后台数据库取,利使用分页控件?尽量有后台方法代码(c#),谢谢

答案满意,加赠园豆!!!

< >
分享
最佳答案
1
 System.Collections.Generic.List<Core.DarrenAdHelper.PC> l = GetPC("LDAP://cnrdc01/OU=CN " + ",DC=cree1, DC=com");
  16:   
  17:          if (l.Count > 0)
  18:          {
  19:              SqlConnection conn = new SqlConnection(Core.DarrenEncodeOrDecode.EncodeOrDecode.Decode(System.Configuration.ConfigurationManager.ConnectionStrings["CotwapConnectionString"].ConnectionString));
  20:              string sql = sql = "delete PCInfo;";
  21:             
  22:                  if (conn.State != ConnectionState.Open)
  23:                      conn.Open();
  24:                  SqlTransaction st = conn.BeginTransaction();
  25:                  try
  26:                  {
  27:                      Core.DarrenCoreLib.DB.SqlHelper.ExecuteNonQuery(st, CommandType.Text, sql);
  28:   
  29:                      foreach (Core.DarrenAdHelper.PC pc1 in l)
  30:                      {
  31:                          sql = sql = "INSERT INTO [PCInfo]([Cn],[Description],[OperatingSystem],[OperatingSystemVersion],[OperatingSystemServicePack],[WhenCreated],[WhenChanged],[LastLogon],[LastLogoff],[DistinguishedName],[SPath]) ";
  32:                          string[] strpath = pc1.DistinguishedName.Replace(",", "").Split(new string[] { "OU=", "DC=", "CN=" }, StringSplitOptions.RemoveEmptyEntries);
  33:                          string spath = string.Empty;
  34:                          for (int i = strpath.Length - 3; i >= 1; i--)
  35:                          {
  36:                              spath += strpath[i] + @"\";
  37:                          }
  38:                          sql += " select '";
  39:                          sql += pc1.Cn + "','" + pc1.Description + "','" + pc1.OperatingSystem + "','" + pc1.OperatingSystemVersion + "','" + pc1.OperatingSystemServicePack + "','" + pc1.WhenCreated + "','" + pc1.WhenChanged + "','";
  40:                          sql += pc1.LastLogon + "','" + pc1.LastLogoff + "','" + pc1.DistinguishedName + "','" + spath + "' ";
  41:                          Core.DarrenCoreLib.DB.SqlHelper.ExecuteNonQuery(st, System.Data.CommandType.Text, sql);
  42:   
  43:                      }
  44:                      st.Commit();
  45:                  }
  46:                  catch
  47:                  {
  48:                      st.Rollback();
  49:                  }
  50:                  finally
  51:                  {
  52:                      if (conn.State != ConnectionState.Closed)
  53:                          conn.Close();
  54:                      Page.Response.Redirect("KillWindow.aspx");
  55:                  }
  56:          }

这儿前后台都有:http://www.cnblogs.com/yiyumeng/archive/2012/02/19/2358726.html

后台:http://www.java2s.com/Code/JavaScript/Ext-JS/ExtPagingToolbarstorepageSizedisplayInfo.htm

http://code.google.com/p/extsharp/source/browse/trunk/ExtJS2Parser/ExtJS2Parser/ext-2.0/source/widgets/PagingToolbar.js?r=68

收获园豆:15
悟行 | 专家六级 |园豆:12559 | 2012-05-03 13:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册