private static DataSet GetJoinedDate(int StaffID, ref DateTime dt) { DataSet ds = null; try { string str = "CREATE PROCEDURE [dbo].[sp_GetJoinedDate](@StaffID int,@JoinedDate datetime output)"; // Parse the stored procedure signature SPSignature signature = new SPSignature(str); SPCaller caller = new SPCaller(signature); caller.ConnectionStr = ConnectionStr; Output outputDT = new Output(dt); ds = caller.CallDataSetProc("[dbo].[sp_GetJoinedDate]", StaffID, outputDT); dt = outputDT.GetDateTime(); } catch (System.Exception ex) { Debug.Print(ex.Message); } return(ds); }
private static DataSet GetAllEmployee() { DataSet ds = null; try { string str = "CREATE PROCEDURE [dbo].[sp_GetAllEmployee]"; // Parse the stored procedure signature SPSignature signature = new SPSignature(str); SPCaller caller = new SPCaller(signature); caller.ConnectionStr = ConnectionStr; ds = caller.CallDataSetProc("[dbo].[sp_GetAllEmployee]"); } catch (System.Exception ex) { Debug.Print(ex.Message); } return(ds); }