示例#1
0
 public void rep_list_bind()
 {
     obj = new db_help();
     sql = "select stID,stlx,stnr,stsj from stk where(txbz='" + c + "') order by stID DESC";
     pds = obj.MPagedDataSource(sql, p, 10);
     obj.Close();
     Rep_list.DataSource = pds;
     Rep_list.DataBind();
     pega.pageNow    = p;
     pega.pageTotle  = pds.PageCount;
     pega.otherQuery = "&c=" + c;
 }
示例#2
0
    public void drop_cla_bind()
    {
        obj = new db_help();
        sql = "select * From txk order by txID";
        pds = obj.MPagedDataSource(sql, 0, 0);
        obj.Close();
        drop_cla.DataSource     = pds;
        drop_cla.DataTextField  = "stlx";
        drop_cla.DataValueField = "txbz";
        drop_cla.DataBind();

        for (int n = 0; n < drop_cla.Items.Count; n++)
        {
            if (System.Convert.ToString(drop_cla.Items[n].Value) == c)
            {
                drop_cla.Items[0].Selected = false;
                drop_cla.Items[n].Selected = true;
                break;
            }
        }
        c = drop_cla.SelectedValue;
    }