Exemple #1
0
        private static string GetJoinedDateCode(int StaffID, ref DateTime dt)
        {
            string code = 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);
                code = caller.GenDataSetProcCode("[dbo].[sp_GetJoinedDate]", StaffID, outputDT);

                dt = outputDT.GetDateTime();
            }
            catch (System.Exception ex)
            {
                Debug.Print(ex.Message);
            }
            return(code);
        }
Exemple #2
0
        private static string GetAllEmployeeCode()
        {
            string code = 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;

                code = caller.GenDataSetProcCode("[dbo].[sp_GetAllEmployee]");
            }
            catch (System.Exception ex)
            {
                Debug.Print(ex.Message);
            }
            return(code);
        }