Пример #1
0
 protected void btnGetJobsArchitect_OnClick(object sender, EventArgs e)
 {
     ServiceReference1.JobOpeningServiceClient client = new JobOpeningServiceClient();
     client.GetJobOpeningByRole("Architect");
     grd.DataSource = client.GetJobOpeningByRole("Architect");
     grd.DataBind();
 }
Пример #2
0
        public IEnumerable<JobOpeningDAO> GetJobOpenings()
        {
            JobOpeningServiceClient client = new JobOpeningServiceClient();

            try
            {
                IEnumerable<JobOpeningDAO> result = client.GetJobOpenings();
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Пример #3
0
        public JobOpeningDAO GetJobOpening(int id)
        {
            JobOpeningServiceClient client = new JobOpeningServiceClient();

            try
            {
                JobOpeningDAO result = client.GetJobOpeningByID(id);
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Пример #4
0
        public bool PostJobOpening(JobOpeningDAO jobOpening)
        {
            JobOpeningServiceClient client = new JobOpeningServiceClient();

            try
            {
                bool result = false;

                // are we editing or creating this item?
                if (jobOpening.JobOpeningID > 0)
                    result = client.UpdateJobOpening(jobOpening);
                else
                    result = client.CreateJobOpening(jobOpening);

                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }