예제 #1
0
 public ActionResult DeleteCTHD(bool confirm, int idCTHD)
 {
     if (Session["TaiKhoan"] == null)
     {
         return(View("../DangNhap/Index"));
     }
     else
     {
         if (confirm == true)
         {
             HoaDonDAO dao = new HoaDonDAO();
             dao.DeleteCTHD(idCTHD);
             var tk = Session["TaiKhoan"] as KhachHang;
             var hd = dao.FindHD(tk.MaKH);
             if (hd != null)
             {
                 Session["ListCTHD"] = dao.GetListCTHD(hd.MaHD);
             }
         }
         return(View("Index"));
     }
 }