protected void btnDelete_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(Request["id"]))
     {
         String     strID = Request["id"];
         Int32      id    = Int32.Parse(strID);
         Automobile car   = Automobile.Delete(id);
         if (car.ID > 0)
         {
             Response.Redirect("CarInventory.aspx");
         }
     }
 }
示例#2
0
 private void buttonAutoDelete_Click(object sender, EventArgs e)
 {
     Automobile.Delete(Int32.Parse(textBoxAutoId.Text.ToString()));
 }