コード例 #1
0
 protected void btn_Delete_Click(object sender, EventArgs e)
 {
     if (TB_ID_Delete.Text == "")
     {
         TB_Error_Delete.Text    = "Please Enter a product ID";
         TB_Error_Delete.Visible = true;
     }
     else
     {
         //delete product
         Bookstore_BO bookstorebo = new Bookstore_BO();
         bookstorebo.deleteProduct(TB_ID_Delete.Text);
         TB_ID_Delete.Text       = "";
         lbl_Message2.Visible    = true;
         lbl_Message2.Text       = "Product has been deleted successfully!";
         TB_Error_Delete.Text    = "";
         TB_Error_Delete.Visible = false;
     }
 }