コード例 #1
0
        private void PerformGetAllData(string strCommandText)
        {
            UltraWebGrid2.ResetColumns();
            UltraWebGrid2.ResetBands();

            ConnectStr = (new igFunctions.DB().getConStr());
            SqlConnection  Con        = new SqlConnection(ConnectStr);
            SqlCommand     cmdCusData = new SqlCommand(strCommandText, Con);
            SqlDataAdapter Adap       = new SqlDataAdapter();

            Con.Open();

            Adap.SelectCommand = cmdCusData;
            Adap.Fill(ds, "AllData");

            Con.Close();

            UltraWebGrid2.DataSource = ds.Tables["AllData"].DefaultView;
            UltraWebGrid2.DataBind();
        }