示例#1
0
        protected void Button3_Click(object sender, EventArgs e)  //查詢按鈕
        {
            string id = this.txtID.Text;

            this.GridView1.DataSource = DataBaseExecutor.SelectTable1DT(id);
            this.GridView1.DataBind();
        }
示例#2
0
        protected void Button2_Click(object sender, EventArgs e)  //刪除按鈕
        {
            this.Response.Write("削除しました。");
            string newID = this.txtID.Text;

            DataBaseExecutor.DeleteTestTable1(newID);
        }
示例#3
0
        protected void Page_Init(object sender, EventArgs e)
        {
            DataTable dt = DataBaseExecutor.SelectTableDT();

            this.Repeater1.DataSource = dt;
            this.Repeater1.DataBind();
        }
示例#4
0
        protected void Button4_Click(object sender, EventArgs e)  //修改按鈕
        {
            string newID     = this.txtID.Text;
            string firstname = this.txtfirstname.Text;
            string lastname  = this.txtlastname.Text;
            string account   = this.txtaccount.Text;
            string password  = this.txtpassword.Text;
            string birthday  = this.txtBirthday.Text;
            string email     = this.txtemail.Text;
            string cellphone = this.txtcellphone.Text;
            string address   = this.txtaddress.Text;

            DataBaseExecutor.UpdateTable1(newID, firstname, lastname, account, password, birthday, email, cellphone, address);
        }
示例#5
0
 /// <summary>
 /// Returns the total download from the Gallery DB.
 /// </summary>
 /// <returns></returns>
 public static int GetTotalDownCount()
 {
     return(DataBaseExecutor.Query <Int32>("SELECT [TotalDownloadCount]  FROM [dbo].[GallerySettings]").SingleOrDefault());
 }
示例#6
0
 protected void Button5_Click(object sender, EventArgs e)  //顯示所有資料按鈕
 {
     this.GridView1.DataSource = DataBaseExecutor.SelectTableDT();
     this.GridView1.DataBind();
 }