コード例 #1
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            EMPLOYEE employee = new EMPLOYEE();

            employee.name                     = StringFunctions.RandStr("A(9)");
            employee.birthDate                = "01/01/78";
            employee.Taxes.taxTable           = "British Columbia";
            employee.Income.payPeriodsPerYear = "26";

            EMP_INCOME_USE empIncomeUse = new EMP_INCOME_USE();

            empIncomeUse.income        = "Regular";
            empIncomeUse.amountPerUnit = Functions.RandCashAmount(2);
            // need a pause to generate second random number
            System.Threading.Thread.Sleep(1000);
            empIncomeUse.hoursPerPeriod = Functions.RandCashAmount(2);
            employee.Income.IncomeData.Add(empIncomeUse);

            PayrollLedger._SA_Create(employee);
            PayrollLedger._SA_Close();

            // set employee name to global var
            this.varEmployee = employee.name;
        }
コード例 #2
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            // Setup Employee
            EMPLOYEE employee = new EMPLOYEE();

            employee.birthDate                = "01/01/78";
            employee.Taxes.taxTable           = "British Columbia";
            employee.Income.payPeriodsPerYear = "26";

            EMP_INCOME_USE empIncomeUse = new EMP_INCOME_USE();

            empIncomeUse.income        = "Regular";
            empIncomeUse.amountPerUnit = Functions.RandCashAmount(2);
            // need a pause to generate second random number
            System.Threading.Thread.Sleep(1000);
            empIncomeUse.hoursPerPeriod = Functions.RandCashAmount(2);
            employee.Income.IncomeData.Add(empIncomeUse);

            if (this.varEmployee == "")
            {
                employee.name = StringFunctions.RandStr("A(9)");
                PayrollLedger._SA_Create(employee);
                PayrollLedger._SA_Close();
            }
            else
            {
                employee.name = this.varEmployee;
            }

            // Create paycheque
            PAYCHEQUE paychq = new PAYCHEQUE();

            paychq.employee = employee;
            PayrollJournal._SA_Create(paychq);
            if (SimplyMessage.repo.SelfInfo.Exists(Variables.iExistWaitTime) && SimplyMessage.repo.Self.Visible)
            {
                SimplyMessage._SA_HandleMessage(SimplyMessage.repo.Yes);
            }
            // Wait post to complete before closing journal
            System.Threading.Thread.Sleep(2000);
            PayrollJournal._SA_Close();
        }