I am currentyl facing issue ,that user click one time on Button ,then entry get inserted two time in system, so i want to set interval of 4 second between entries,mean that if User insert time 11:15:14 ,if user try to save another entry then it take 4 second ,means that next entry save on 11:15:19.
below is code
ALTER PROCEDURE [dbo].[spInsertPorderder]
-- Add the parameters for the stored procedure here
@Codeitem int,
@OrderNo int,
@prdqty int,
@IDWoker int,
@EntryDate date,
@FID int,
@Weight int,
@SecID int,
@Rmk varchar (50),
@ETime time(7),
@BrefNo varchar (50),
@IPAddress [varchar](50) ,
@Gweigth int,
@OID int output
AS
BEGIN
SET NOCOUNT ON;
IF NOT EXISTS
(
SELECT ETIME, IPAddress,EntryDate FROM Probale
WHERE ETIME = @ETIME and IPAddress = @IPAddress and EntryDate=@EntryDate and Codeitem=@Codeitem
)
Begin
insert into Probale(Codeitem,OrderNo,prdqty,IDWokrer,EntryDate,FID,Weigth,SecID,Rmk,ETime,BrefNo,IPAddress,Gweigth )
values(@Codeitem,@OrderNo,@prdqty,@IDWoker,@EntryDate,@FID,@Weight,@SecID,@Rmk,@ETime,@BrefNo,@IPAddress,@Gweigth )
set @OID=SCOPE_IDENTITY()
end
end
105358-double.txt