Exemple #1
0
        /// <summary>
        /// 获取结束回调
        /// </summary>
        /// <param name="users"></param>
        private void GetJobListEnd(ICollection <Job> jobs)
        {
            //GalaSoft.MvvmLight.Threading.DispatcherHelper
            //            .CheckBeginInvokeOnUI(() =>

            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                JobsList.Clear();
                foreach (Job job in jobs)
                {
                    //Boolean flag = false;
                    //foreach(CollectJob cjob in CollectJobList)
                    //    if (cjob.JobId.Equals(job.Id))
                    //    {
                    //        flag = true;
                    //        break;
                    //    }
                    // if(!flag)
                    job.Color = JobsList.Count % 3 + "";
                    JobsList.Add(job);
                }

                if (JobsList.Count == 0)
                {
                    Messenger.Default.Send <string>("", "JobEmpty");
                }
                else
                {
                    Messenger.Default.Send <string>("", "JobRefreshCompleted");
                }
            });
        }
 public void Search(string text)
 {
     JobsList.Clear();
     RaisePropertyChanged("JobsList");
     JobsList = RFRepo.SearchForJobs(text, SelectedStatus);
     RaisePropertyChanged("JobsList");
 }
Exemple #3
0
        public List <JobsList> getJobsList()
        {
            List <JobsList> pocos = new List <JobsList>();

            using (SqlConnection _connection = new SqlConnection(ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString))
            {
                SqlCommand cmd = new SqlCommand
                {
                    Connection  = _connection,
                    CommandText = @"select cjd.Job, cd.Company_Name, cjd.Job_Name, cjd.Job_Descriptions
                                    from dbo.Company_Jobs_Descriptions cjd
                                    join dbo.Company_Jobs cj on cj.id = cjd.Job
                                    join dbo.Company_Descriptions cd on cj.Company = cd.Company
                                    where cj.Id not in (select job from Applicant_Job_Applications where Applicant = '" + System.Web.HttpContext.Current.Session["ApplicantProfileId"].ToString() + "');"
                };

                _connection.Open();
                SqlDataReader reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    JobsList poco = new JobsList
                    {
                        Id             = reader.GetGuid(0),
                        CompanyName    = reader.GetString(1),
                        JobName        = reader.GetString(2),
                        JobDescription = reader.GetString(3)
                    };

                    pocos.Add(poco);
                }
                _connection.Close();
            }
            return(pocos);
        }
        public ActionResult CompanyRepHomeDetails(string companyID)
        {
            JobsList jobsList = new JobsList();

            ViewBag.CompanyID = companyID;

            return(View(jobsList));
        }
 /// <summary>
 /// To update work history details of the jobseeker
 /// </summary>
 /// <param name="id">WorkHistoryId</param>
 /// <param name="jobSeekerWorkHistoryObj">WorkHistoryObject</param>
 public void Put(string id, JobsList jobSeekerWorkHistoryObj)
 {
     try
     {
         jobSeekerWorkHistoryObj.Id = new Guid(id);
         ServiceFactory.GetJobsList().Update(jobSeekerWorkHistoryObj);
     }
     catch (Exception exp) { }
 }
Exemple #6
0
        public void TestListDlpJobs()
        {
            var dlp    = DlpServiceClient.Create();
            var dlpJob = dlp.CreateDlpJob(Fixture.GetTestRiskAnalysisJobRequest());

            TestRetryRobot.ShouldRetry = ex => true;
            TestRetryRobot.Eventually(() =>
            {
                var response = JobsList.ListDlpJobs(Fixture.ProjectId, "state=DONE", "RiskAnalysisJob");

                Assert.True(response.Any());
            });
        }
        public static void Main()
        {
            var jobs      = new JobsList();
            var employees = new List <Employee>();

            while (true)
            {
                var input = Console.ReadLine().Split();
                if (input[0] == "End")
                {
                    break;
                }

                switch (input[0])
                {
                case "Job":
                    var name     = input[1];
                    var hours    = int.Parse(input[2]);
                    var employee = employees.FirstOrDefault(e => e.Name == input[3]);
                    Job job      = new Job(name, hours, employee);

                    job.JobDone += job.OnJobDone;
                    jobs.Add(job);
                    break;

                case "StandardEmployee":
                    name = input[1];
                    employees.Add(new StandartEmployee(name));
                    break;

                case "PartTimeEmployee":
                    name = input[1];
                    employees.Add(new PartTimeEmployee(name));
                    break;

                case "Pass":
                    jobs.ForEach(j => j.Update());
                    break;

                case "Status":
                    foreach (var j in jobs)
                    {
                        if (!j.IsDone)
                        {
                            Console.WriteLine(j.ToString());
                        }
                    }
                    break;
                }
            }
        }
    static void Main(string[] args)
    {
        JobsList            jobs      = new JobsList();
        List <BaseEmployee> employees = new List <BaseEmployee>();

        string[] input = Console.ReadLine().Split();
        while (input[0] != "End")
        {
            switch (input[0])
            {
            case "Job":
                Job realJob = new Job(input[1], int.Parse(input[2]), employees.FirstOrDefault(e => e.Name == input[3]));
                realJob.JobDone += realJob.OnJobDone;
                realJob.JobDone += jobs.OnJobDone;
                jobs.Add(realJob);
                break;

            case "StandartEmployee":
                employees.Add(new StandartEmployee(input[1]));
                break;

            case "PartTimeEmployee":
                employees.Add(new PartTimeEmployee(input[1]));
                break;

            case "Pass":
                foreach (var job in jobs)
                {
                    job.Update();
                }
                break;

            case "Status":
                foreach (var job in jobs)
                {
                    if (!job.IsDone)
                    {
                        Console.WriteLine(jobs.ToString());
                    }
                }
                break;

            default:
                break;
            }

            input = Console.ReadLine().Split();
        }
    }
    public static void Main()
    {
        var jobs      = new JobsList();
        var employees = new List <IEmployee>();

        var input = Console.ReadLine().Split();

        while (!input[0].Equals("End"))
        {
            switch (input[0])
            {
            case "Job":
                var currentJob = new Job(input[1], int.Parse(input[2]), employees.FirstOrDefault(e => e.Name.Equals(input[3])));
                jobs.Add(currentJob);
                currentJob.JobDone += jobs.OnJobDone;
                break;

            case "StandartEmployee":
                var standartEmployee = new StandartEmployee(input[1]);
                employees.Add(standartEmployee);
                break;

            case "PartTimeEmployee":
                var parttimeEmployee = new PartTimeEmployee(input[1]);
                employees.Add(parttimeEmployee);
                break;

            case "Pass":

                foreach (Job job in jobs.ToArray())
                {
                    job.Update();
                }

                break;

            case "Status":

                foreach (Job job in jobs)
                {
                    Console.WriteLine(job);
                }

                break;
            }

            input = Console.ReadLine().Split();
        }
    }
        private void ShowJobs()
        {
            using (AccessPointClient accessPoint = new AccessPointClient())
            {
                JobData[] jobs = accessPoint.GetJobs(new GetJobsRequest
                {
                    Skip = 0,
                    Take = int.MaxValue,
                }).Jobs;

                JobsList.DataSource = jobs;
                JobsList.DataBind();
                JobsListPager.Visible = jobs.Length > JobsListPager.MaximumRows;
            }
        }
        public void TestDeleteJob()
        {
            using var randomBucketFixture = new RandomBucketFixture();
            using var bucketCollector     = new BucketCollector(randomBucketFixture.BucketName);
            var bucketName = randomBucketFixture.BucketName;
            var fileName   = Guid.NewGuid().ToString();
            var objectName = $"gs://{bucketName}/{fileName}";

            bucketCollector.CopyToBucket(Path.Combine(Fixture.ResourcePath, "dates-input.csv"), fileName);
            var job = JobsCreate.CreateJob(Fixture.ProjectId, objectName);

            JobsDelete.DeleteJob(job.Name);
            var activeJobs = JobsList.ListDlpJobs(Fixture.ProjectId, "state = RUNNING", DlpJobType.InspectJob);

            Assert.DoesNotContain(activeJobs, j => j.Name == job.Name);
        }
        public ActionResult CompanyRepJobForm(FormCollection formCollection)
        {
            Job                  j           = new Job();
            JobsList             jobsList    = new JobsList();
            UserDetailsInterface udInterface = new Helper();

            j.company_id       = udInterface.GetIDByUserName(User.Identity.Name, "company_rep").ToString();
            j.seeking_degree   = formCollection["seeking_degree"];
            j.title            = formCollection["title"];
            j.type             = formCollection["type"];
            j.visa_sponsorship = formCollection["visa_sponsorship"];

            jobsList.addJob(j);

            return(RedirectToAction("CompanyRepHomeDetails"));
        }
Exemple #13
0
    public static void Main()
    {
        JobsList           jobs      = new JobsList();
        List <BaseEmploee> employees = new List <BaseEmploee>();

        string input = Console.ReadLine();

        while (input != "End")
        {
            string[] args = input.Split();
            switch (args[0])
            {
            case "Job":
                Job job = new Job(args[1], int.Parse(args[2]), employees.First(e => e.Name == args[3]));
                jobs.Add(job);
                break;

            case "StandartBaseEmploee":
                BaseEmploee standartBaseEmploee = new StandartBaseEmploee(args[1]);
                employees.Add(standartBaseEmploee);
                break;

            case "PartTimeBaseEmploee":
                BaseEmploee parttimeBaseEmploee = new PartTimeBaseEmploee(args[1]);
                employees.Add(parttimeBaseEmploee);
                break;

            case "Pass":
                foreach (var jobInProgress in jobs)
                {
                    jobInProgress.Update();
                }
                break;

            case "Status":
                foreach (var jobb in jobs)
                {
                    Console.WriteLine(jobb.ToString());
                }
                break;
            }
            input = Console.ReadLine();
        }
    }
Exemple #14
0
        public void TestCreateDlpJob()
        {
            using var randomBucketFixture = new RandomBucketFixture();
            using var bucketCollector     = new BucketCollector(randomBucketFixture.BucketName);
            var bucketName = randomBucketFixture.BucketName;
            var fileName   = Guid.NewGuid().ToString();
            var objectName = $"gs://{bucketName}/{fileName}";

            bucketCollector.CopyToBucket(Path.Combine(Fixture.ResourcePath, "dates-input.csv"), fileName);
            var job = JobsCreate.CreateJob(Fixture.ProjectId, objectName);

            TestRetryRobot.ShouldRetry = ex => true;
            TestRetryRobot.Eventually(() =>
            {
                var response = JobsList.ListDlpJobs(Fixture.ProjectId, "state=DONE", "InspectJob");

                Assert.True(response.Any());
            });
        }
Exemple #15
0
        public static job GetJob(ulong UserId)
        {
            if (StoreHandler.LoadData(UserId, $"JOB") != null)
            {
                var Job = new job()
                {
                    Name = StoreHandler.LoadData(UserId, $"JOB"),
                    Pay  = long.Parse(StoreHandler.LoadData(UserId, $"JOB-PAY")),
                };
                Job.StillAvailable = JobsList.ContainsKey(Job.Name);
                DateTime.TryParse(StoreHandler.LoadData(UserId, "JOB-TIMESTAMP"), out Job.Timestamp);

                return(Job);
            }
            else
            {
                return(null);
            }
        }
Exemple #16
0
        ////public override void Cleanup()
        ////{
        ////    // Clean up if needed

        ////    base.Cleanup();
        ////}

        /// <summary>
        /// 获取结束回调
        /// </summary>
        /// <param name="users"></param>
        private void GetAddJobListEnd(ICollection <Job> jobs)
        {
            //GalaSoft.MvvmLight.Threading.DispatcherHelper
            //            .CheckBeginInvokeOnUI(() =>

            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                Messenger.Default.Send <int>(JobsList.Count, "JobLoadCompleted");
                foreach (Job job in jobs)
                {
                    job.Color = JobsList.Count % 3 + "";
                    JobsList.Add(job);
                }
                if (JobsList.Count == 0)
                {
                    Messenger.Default.Send <string>("", "JobEmpty");
                }
            });
        }
 private void ShowJobs()
 {
     using (AccessPointClient accessPoint = new AccessPointClient())
     {
         List <JobData> jobs = new List <JobData>();
         JobData[]      page;
         do
         {
             page = accessPoint.GetJobs(new GetJobsRequest
             {
                 Skip = (uint)jobs.Count,
                 Take = PageSize,
             }).Jobs;
             jobs.AddRange(page);
         }while (page != null && page.Length == PageSize);
         JobsList.DataSource = jobs;
         JobsList.DataBind();
         JobsListPager.Visible = jobs.Count > JobsListPager.MaximumRows;
     }
     lblLastRefresh.Text = DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss");
 }
        public void ShowJobs()
        {
            using (AccessPointClient accessPoint = new AccessPointClient())
            {
                List <JobData> jobs = new List <JobData>();
                JobData[]      page;
                do
                {
                    if (!string.IsNullOrWhiteSpace(ApplicationName))
                    {
                        page = accessPoint.GetJobs(new GetJobsRequest
                        {
                            Skip         = (uint)jobs.Count,
                            Take         = PageSize,
                            Applications = new string[] { ApplicationName },
                            JobStatuses  = ShownStatuses.ToArray(),
                        }).Jobs;
                        jobs.AddRange(page);
                    }
                    else
                    {
                        page = accessPoint.GetJobs(new GetJobsRequest
                        {
                            Skip        = (uint)jobs.Count,
                            Take        = PageSize,
                            JobStatuses = ShownStatuses.ToArray(),
                        }).Jobs;
                        jobs.AddRange(page.Where(j => string.IsNullOrWhiteSpace(j.Application)));
                    }
                }while (page != null && page.Length == PageSize);

                jobs = jobs.Where(j => string.IsNullOrWhiteSpace(GroupName) ? j.Group == null || j.Group == "" : j.Group == GroupName).ToList();

                JobsList.DataSource = jobs;
                JobsList.DataBind();
                JobsListPager.Visible = jobs.Count > JobsListPager.MaximumRows;
            }
        }
Exemple #19
0
        public async Task GetInfintyData(int pagenumber)
        {
            try
            {
                // IsBusy = true;

                if (JobsList.Count == 0)
                {
                    pagenumber = 0;
                    var newresult = await GetData(pagenumber);

                    //JobsList = new InfiniteScrollCollection<JobEmployerDataModel>(newresult);

                    foreach (var item in newresult)
                    {
                        JobsList.Add(item);
                    }
                }
                JobsList.OnLoadMore = async() =>
                {
                    IsLoadingIndicator = true;
                    pagenumber        += 5;
                    var list = await GetData(pagenumber);



                    IsLoadingIndicator = false;

                    return(list);
                };
            }
            catch (Exception e)
            {
                throw e;
            }
        }
 /// <summary>
 /// To create a new work history details
 /// </summary>
 /// <param name="jobSeekerWorkHistoryObj">WorkHistory object</param>
 public string Post(JobsList jobSeekerWorkHistoryObj)
 {
     ServiceFactory.GetJobsList().Create(jobSeekerWorkHistoryObj);
     return(jobSeekerWorkHistoryObj.Id.ToString());
 }