Ejemplo n.º 1
0
        private void Submit_bt_Click(object sender, EventArgs e)
        {
            try
            {
                var Education_level       = edu_tb.Text;
                var Contact_number        = cont_tb.Text;
                var Hobbies               = hobby_tb.Text;
                var Email                 = email_tb.Text;
                var PriorWork_Experiences = exper_tb.Text;
                var Qualifications        = qualifica_tb.Text;

                // var vacancy_id = v
                var Resume_details = new Resume_details
                {
                    Education_level       = Education_level,
                    Contact_number        = Contact_number,
                    Hobbies               = Hobbies,
                    Email                 = Email,
                    PriorWork_Experiences = PriorWork_Experiences,
                    Qualifications        = Qualifications
                };

                _db.Resume_details.Add(Resume_details);
                _db.SaveChanges();

                var resume_id = Resume_details.id;


                var Job_Applications_details = new Job_Applications_details
                {
                    resume_id = resume_id,
                };

                _db.Job_Applications_details.Add(Job_Applications_details);
                _db.SaveChanges();
            }
            catch (Exception)
            {
                // throw;
            }
        }
        private void Submit_bt_Click(object sender, EventArgs e)
        {
            try
            {
                // var JobSkrTable = new Resume_details();
                var Data          = _db.Resume_details.FirstOrDefault(q => q.id == 3);
                var JobseekerData = _db.Resume_details.FirstOrDefault(q => q.Jobseeker_details_id == _jbsId);
                var ResumeId      = JobseekerData.id;

                // int ResumeId = Data.id;

                var Applicant = new Job_Applications_details
                {
                    resume_id          = ResumeId,
                    Jobseeker_id       = _jbsId,
                    vacancy_id         = VId,
                    Application_status = "Pending"
                };

                _db.Job_Applications_details.Add(Applicant);
                _db.SaveChanges();
                MessageBox.Show("Job application was successfull");
                this.Close();
                // lb_id.Text = resume.id.ToString();


                var Id      = int.Parse(lb_id.Text);
                var vacancy = _db.Vacancy_details.FirstOrDefault(q => q.id == Id);

                //   _db.SaveChanges();

                // _db.Job_Applications_details.Add(this, vacancy, resume);
                // _db.SaveChanges();*/
            }
            catch (Exception)
            {
                MessageBox.Show("Job application was successfull");
                // throw;
            }
        }
 private void Populatefields(Job_Applications_details Review)
 {
     lb_id.Text     = Review.id.ToString();
     Status_tb.Text = Review.Application_status;
 }
 public Review_Application(Job_Applications_details Review)
 {
     InitializeComponent();
     _db = new Jobapp_dbEntities();
     Populatefields(Review);
 }