BAL.cs
- public void Delete(string id)
- {
- cmd = new MySqlCommand("DeleteProduct", con);
- cmd.CommandType = CommandType.StoredProcedure;
- cmd.Parameters.AddWithValue("in_ProductId", id);
- con.Open();
- int i = cmd.ExecuteNonQuery();
- con.Close();
- }
- public ActionResult DeleteProduct(string id)
- {
- try
- {
- BAL objBAL = new BAL();
- string product = objBAL.Delete(id); //error
- if (product != null)
- {
- Response.Write("");
- }
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
Nitin SontakkePosted May 23, 2018, 2:33 AM