Exemplo n.º 1
0
 protected void Delete_Click(object sender, EventArgs e)
 {
     if (this.name.Text == "")
     {
         Response.Write("<script> alert('Name is required for deletion'); </script>");
         this.clearForm();
     }
     else
     {
         TMS.Common.Customer cust = new TMS.Common.Customer();
         cust.FullName = Convert.ToString(this.name.Text);
         TMS.BLL.CustomerBLL customers = new TMS.BLL.CustomerBLL();
         if (customers.delCustomer(cust) == true)
         {
             Response.Write("<script> alert('User Deleted'); </script>");
             this.clearForm();
         }
         else
         {
             Response.Write("<script> alert('Deletion failed'); </script>");
             this.clearForm();
         }
     }
 }