public void DeleteDepartment(E_Departments _department) { //le pasamos la cadena de texto con el nombre de nuestro procedimiento almacenado SqlCommand cmd = new SqlCommand("SP_delete_department", connection); //ahora le decimos que ese dato que le pasamos no es un texto normal si no un procedimiento almacenado cmd.CommandType = CommandType.StoredProcedure; connection.Open(); //agregamos los campos de la consulta cmd.Parameters.AddWithValue("@id_department", _department.IdDepartment); //ejecutamos la consulta cmd.ExecuteNonQuery(); connection.Close(); }
public void UpdateDepartment(E_Departments _department) { objDepartment.UpdateDepartment(_department); }
public void DeleteDepartment(E_Departments _department) { objDepartment.DeleteDepartment(_department); }
public void InsertDepartment(E_Departments _department) { objDepartment.InsertDepartment(_department); }