コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        myButton.InnerText = "yyy";


        DataTable dataSet = new MySqlServices().AA(1, 100);

        GridView1.DataSource = dataSet;
        GridView1.DataBind();
    }
コード例 #2
0
ファイル: Startup.cs プロジェクト: raelamorim/Pedido
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddControllers().AddNewtonsoftJson(opt =>
     {
         opt.SerializerSettings.ReferenceLoopHandling =
             Newtonsoft.Json.ReferenceLoopHandling.Ignore;
     });
     services.AddControllers();
     MySqlServices.ConfigureServices(services, Configuration);
     RedisServices.ConfigureServices(services, Configuration);
     CasoUsoServices.ConfigureServices(services);
 }
コード例 #3
0
        public ArticleCollection GetArticle(string startIndex, string count)
        {
            ArticleCollection articles = new ArticleCollection();
            DataTable         dt       = new MySqlServices().AA(Convert.ToInt32(startIndex), Convert.ToInt32(count));

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                Article article = new Article();
                article.Content = dt.Rows[i][0].ToString();
                articles.Articles.Add(article);
            }
            return(articles);
        }