コード例 #1
0
 protected void btXoa_Click(object sender, EventArgs e)
 {
     BUSHoatDong bushoatdong = new BUSHoatDong();
     bushoatdong.Xoa(int.Parse(ddlMaHoatDong.SelectedValue));
     Response.Redirect("QuanLyHoatDong.aspx");
 }
コード例 #2
0
        protected void XoaHoatDong(int id)
        {
            try
            {
                //xac nhan truoc khi xoa
                BUSHoatDong bus = new BUSHoatDong();
                if (bus.Xoa(id) == 0)
                {
                    //Thong bao
                    Response.Redirect("HoatDong.aspx");
                }

            }

            catch
            {
            }
        }
コード例 #3
0
        protected void btnXoa_Click(object sender, EventArgs e)
        {
            try
            {
                //lay thong tin tu textbox
                int mahoatdong = int.Parse(Request.QueryString["id"]);

                BUSHoatDong BUSHoatDong = new BUSHoatDong();
                HOATDONG hoatdong = BUSHoatDong.TimKiem(mahoatdong);

                //xac nhan truoc khi xoa

                    //Goi ham xoa

                    BUSDangKyHoatDong BUSDangKyHoatDong = new BUSDangKyHoatDong();
                    BUSDangKyHoatDong.Xoa(mahoatdong);

                    if (BUSHoatDong.Xoa(mahoatdong) == 0)
                    {
                        //Thong bao
                        lbThongBao.Text = "Xóa Thành Công";
                        lbThongBao.Visible = true;
                        DeleteHinhAnh(link);
                        link = "";
                        Response.Redirect("~/administration/HoatDong.aspx");
                    }
                    else
                    {
                        lbThongBao.Text = "Xóa Không Thành Công";
                        lbThongBao.Visible = true;
                    }

            }

            catch
            {
                lbThongBao.Text = "Xóa Không Thành Công";
                lbThongBao.Visible = true;
            }
        }