I have a stored procedure that inserts records into two tables at the same time. And I want that in the program, when you click on the SAVE button, you can call that procedure. How can I do that process? Thank you in advance.
Here is my SP:
create proc InserTablas
(@Id_Pago char(10), @Pago decimal(12, 2), @Id_Capital char (10), @id_Pago2 char(10), @Fecha_Pago varchar(20))
AS
INSERT INTO Pagos (id_pago, pago, id_capital) VALUES (@Id_Pago, @Pago, @Id_Capital);
INSERT INTO detalle_pago (id_pago, fecha_pago) VALUES (@id_Pago2, @Fecha_Pago)
GO
I'm working with Visual Studio 2013 - C #