i have a scenario that when any user first upload document then this go for approval first to supervisor then when supervisor approve/reject documents then only approve documents go to manager then again when manager approve/reject document then only approve
document shows to director for final approval
ALTER PROCEDURE [dbo].[ALLDOCUMNETS]
AS
begin
SELECT dbo.DocumentInfo.DocID as DocumentID,
dbo.DocumentInfo.DocName as DocumentName,
dbo.DocumentInfo.Uploadfile as FileUploaded,
dbo.Userss.Email as UserEmail,
dbo.Department.DepType as Department,
dbo.DocType.DocType as Document,
dbo.DocumentInfo.UploadedBy as UploadedBy,
dbo.Approval.AppoveBy, dbo.ApproveType.ApproveType as Status
FROM dbo.DocumentInfo INNER JOIN
dbo.Approval ON dbo.DocumentInfo.DocID = dbo.Approval.DocID
inner JOIN dbo.Userss on Userss.UserName =dbo.DocumentInfo.UploadedBy inner
...
Go to the complete details ...