protected void Page_Load(object sender, EventArgs e)
        {
            CheckLogin();
            DataTable dt = CobcYouthDAL.GetMember();

            GridViewMember.DataSource = dt;
            GridViewMember.DataBind();
        }
Exemple #2
0
 protected void GridViewMember_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteRow")
     {
         int memberID = int.Parse(e.CommandArgument.ToString());
         MemberDAO.DeleteMember(memberID);
         GridViewMember.DataBind();
     }
 }
Exemple #3
0
        protected void ButtonAdd_Click(object sender, EventArgs e)
        {
            string name    = TextBoxName.Text.Trim();
            string sex     = TextBoxSex.Text.Trim();
            string address = TextBoxAddress.Text.Trim();
            string phone   = TextBoxPhone.Text.Trim();
            string email   = TextBoxEmail.Text.Trim();

            MemberDAO.InsertMember(name, sex, address, phone, email);
            GridViewMember.DataBind();
        }