Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string path       = Server.MapPath("./sqlite/");
            string dataSource = Path.Combine(path, "todo.db");

            using (SQLiteUtility util = new SQLiteUtility(dataSource))
            {
                util.Connect();

                string sql = "SELECT * FROM Todo";
                Dictionary <string, dynamic> parameters = null;

                DataTable table = util.Fill(sql, parameters);

                MainRepeater.DataSource = table;
                MainRepeater.DataBind();
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable table = new DataTable();

            table.Columns.Add("StatusBox");
            table.Columns.Add("TaskBox");
            table.Columns.Add("RemarksBox");
            table.Columns.Add("DeleteButton");

            DataRow row = table.NewRow();

            row["StatusBox"]    = "未着手";
            row["TaskBox"]      = "帳票作成";
            row["RemarksBox"]   = "税改正対応";
            row["DeleteButton"] = "削除";
            table.Rows.Add(row);

            MainRepeater.DataSource = table;
            MainRepeater.DataBind();
        }