Ejemplo n.º 1
0
        private void btnHuyhd_Click(object sender, EventArgs e)
        {
            int     maHoaDon = Convert.ToInt32(tbxSohd.Text);
            PhieuHd del      = PhieuHd_BUS.GetAll().Where(m => m.MaPhieuHd == maHoaDon).FirstOrDefault();

            PhieuHd_BUS.Delete(del);
            Close();
        }
Ejemplo n.º 2
0
        protected void GridView1_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            GridViewRow row      = (GridViewRow)GridView1.Rows[e.RowIndex];
            int         maHoaDon = int.Parse(((Label)row.FindControl("maHoaDon")).Text);
            PhieuHd     del      = PhieuHd_BUS.GetAll().Where(m => m.MaPhieuHd == maHoaDon).FirstOrDefault();

            PhieuHd_BUS.Delete(del);
            this.BindGrid();
        }