protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("del")) { int cid = Convert.ToInt32(e.CommandArgument); CustomerMethods Op = new CustomerMethods(); int res = Op.Delete(cid); if (res > 0) { GridView1.DataSource = Op.ViewCustomer(); GridView1.DataBind(); Response.Write("Deactivated"); } } }
public StatusResponse DeleteCustomer(CustomerRequest request) { LicenseCheck(request.LicenseKey); StatusResponse response = new StatusResponse(); response.LicenseKey = request.LicenseKey; try { customerMethods.Delete(request.CustomerId); response.Status = true; } catch { response.Status = false; } return(response); }
public void DeleteCustomer(string id) { customerMethods.Delete(int.Parse(id)); }