Exemple #1
0
        // GET: Employee/Details/5
        public ActionResult Details(int id)
        {
            ShowEmployee        ViewModel = new ShowEmployee();
            string              url       = "employeedata/findemployee/" + id;
            HttpResponseMessage response  = client.GetAsync(url).Result;

            //Can catch the status code (200 OK, 301 REDIRECT), etc.
            //Debug.WriteLine(response.StatusCode);
            if (response.IsSuccessStatusCode)
            {
                //Put data into job posting data transfer object
                EmployeeDto SelectedEmployee = response.Content.ReadAsAsync <EmployeeDto>().Result;
                ViewModel.employee = SelectedEmployee;


                url      = "employeedata/findjob_postingforemployee/" + id;
                response = client.GetAsync(url).Result;
                Job_PostingDto SelectedJob_Posting = response.Content.ReadAsAsync <Job_PostingDto>().Result;
                ViewModel.job_posting = SelectedJob_Posting;

                return(View(ViewModel));
            }
            else
            {
                return(RedirectToAction("Error"));
            }
        }
Exemple #2
0
        public void Edit_Book_Tag_for_emp(string name, string description, string cover_path_file)
        {
            show_employee     = (Microwave_v1._0.Forms.ShowEmployee)Application.OpenForms["ShowEmployee"];
            lbl_bookname.Text = name;
            this.lbl_description.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            lbl_description.Text           = description;
            lbl_author.Text = " ";

            this.pic_book.Image = Picture_Events.Get_Copy_Image_Bitmap(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\" + cover_path_file);
        }
Exemple #3
0
        private void ShowEmployee_Click(object sender, RoutedEventArgs e)
        {
            ShowEmployee show = new ShowEmployee();

            show.ShowDialog();
        }