protected void btnUpdate_Click(object sender, EventArgs e)
 {
     bpp = new Bol_Packing_Place();
     pl = new Packing_Place();
     if (txtSearch.Text == "")
     {
         Response.Write("Vui long nhap ten hay id can tim !!!");
         txtSearch.Focus();
     }
     else
     {
         if (DropDownList4.SelectedValue.ToString() == "ByID")
         {
             if (bpp.CheckParking_PlaceExistByID(Convert.ToInt32(txtID.Text)) == 0)
             {
                 if (txtName.Text == "")
                 {
                     Response.Write("Vui long nhap thong tin cap nhat !!!");
                 }
                 else
                 {
                     pl.Ci_ID = Convert.ToInt32(txtID.Text);
                     pl.Name = txtName.Text;
                     if (RadioButton1.Checked)
                     {
                         pl.Status = true;
                     }
                     else
                     {
                         pl.Status = false;
                     }
                     try
                     {
                         GridView1.DataSource = bpp.UpdatePacking_PlaceByID(pl);
                         GridView1.DataBind();
                     }
                     catch (Exception ex)
                     {
                         Response.Write(ex.Message + "SAO LAI THE NHI !!!");
                     }
                 }
             }
             else
             {
                 Response.Write("ID ban nhap khong ton tai !!!");
                 txtID.Focus();
             }
         }
         else if (DropDownList4.SelectedValue.ToString() == "ByName")
         {
             if (bpp.CheckParking_PlaceExistByName(txtID.Text) == 0)
             {
                 if (txtName.Text == "")
                 {
                     Response.Write("Vui long nhap thong tin cap nhat !!!");
                 }
                 else
                 {
                     pl.Name = txtName.Text;
                     try
                     {
                         GridView1.DataSource = bpp.UpdatePacking_PlaceByName(pl);
                         GridView1.DataBind();
                     }
                     catch (Exception ex)
                     {
                         Response.Write(ex.Message + "CHAN CHUA KIA !!!");
                     }
                 }
             }
             else
             {
                 Response.Write("Ten ban nhap khong ton tai !!!");
                 txtID.Focus();
             }
         }
     }
 }