Beispiel #1
0
 public JobManagement_Should(ITestOutputHelper output)
 {
     _output    = output ?? throw new ArgumentNullException(nameof(output));
     _searchCmd = new SearchJobs()
     {
         Config = OpnSenseDevice.Instance, Logger = this
     };
     _addCmd = new AddJob()
     {
         Config = OpnSenseDevice.Instance, Logger = this
     };
     _updateCmd = new UpdateJob()
     {
         Config = OpnSenseDevice.Instance, Logger = this
     };
     _toggleCmd = new ToggleJob()
     {
         Config = OpnSenseDevice.Instance, Logger = this
     };
     _getCmd = new GetJobDetails()
     {
         Config = OpnSenseDevice.Instance, Logger = this
     };
     _deleteCmd = new DeleteJob()
     {
         Config = OpnSenseDevice.Instance, Logger = this
     };
 }
Beispiel #2
0
 public StepsDefinitions(IWebDriver driver)
 {
     _homePage   = new HomePage(driver);
     _jobBoard   = new JobBoard(driver);
     _searchJobs = new SearchJobs(driver);
     _signIn     = new SignInPopup(driver);
     _appForm    = new ApplicationForm(driver);
 }
Beispiel #3
0
        public ActionResult Index(JobModel _mm, int?pnumber, int?psize)
        {
            int        recordCount = 0;
            JobModel   _model      = new JobModel();
            JobWS      objJob      = new JobWS();
            SearchJobs obj         = new SearchJobs();

            obj.startRecord = 0;
            obj.pageSize    = 20;
            if (pnumber.HasValue)
            {
                obj.pageSize = psize.Value;
            }
            if (pnumber.HasValue)
            {
                pnumber         = pnumber.Value;
                obj.startRecord = (pnumber.Value - 1) * psize.Value;
            }
            else
            {
                pnumber         = 1;
                obj.startRecord = 0;
            }


            obj.jobCategoryIds = new int[] { Convert.ToInt32(Session["SectorId"]) };
            obj.regionIds      = new int[] { Convert.ToInt32(Session["LocationId"]) };
            obj.keywords       = Convert.ToString(Session["Keyword"]);
            if (Convert.ToInt32(Session["SectorId"]) == 0)
            {
                obj.jobCategoryIds = null;
            }
            if (Convert.ToInt32(Session["LocationId"]) == 0)
            {
                obj.regionIds = null;
            }
            _model.JobList      = objJob.SearchJobs(obj.employeeIds, obj.jobCategoryIds, obj.regionIds, obj.excludeAgencies, obj.industryIds, JobDuration.Any, JobHours.Any, obj.keywords, obj.fromDate, obj.toDate, obj.startRecord, obj.pageSize, obj.key, out recordCount).ToList();
            _model.LocationList = BindCountry();
            _model.SectorList   = BindSector();
            _model.LocationId   = Convert.ToString(Session["LocationId"]);
            _model.SectorId     = Convert.ToString(Session["SectorId"]);
            _model.Keyword      = Convert.ToString(Session["Keyword"]);
            ViewBag.PageNumber  = pnumber;
            ViewBag.RecordCount = recordCount;
            int mod       = recordCount % obj.pageSize;
            int pagecount = recordCount / obj.pageSize;

            if (mod > 0)
            {
                pagecount = pagecount + 1;
            }

            ViewBag.PageCount = pagecount;
            ViewBag.PageSize  = obj.pageSize;
            return(View(_model));
        }