Beispiel #1
0
        private void buttonClickToFatch_Click(object sender, EventArgs e)
        {
            JobOpenings obj = jobdbhelper.GetJobById(int.Parse(VacanciesTable.SetValueForText1));

            obj1 = obj;
            textMinExperience.Text     = (obj.MinExperience).ToString();
            textJobDiscription.Text    = obj.JobDescription;
            textExpectedStartDate.Text = obj.ExpectedStartDate;
            textDesignation.Text       = obj.Designation;
            textDepartment.Text        = obj.Department;
        }
Beispiel #2
0
        private void Submit_Click(object sender, EventArgs e)
        {
            JobOpenings job = new JobOpenings();

            job.MinExperience     = int.Parse(textMinExperience.Text);
            job.JobDescription    = textJobDescription.Text;
            job.DatePosted        = DateTime.Now.ToString("YYYY-mm-DD");
            job.ExpectedStartDate = textExpectedStartDate.Text;
            job.Designation       = ((KeyValuePair <int, string>)comboDesignationName.SelectedItem).Value;
            job.Department        = ((KeyValuePair <int, string>)comboDepartmentName.SelectedItem).Value;
            int result = JobOpeningDBHelper.AddJob(job);

            if (result > 0)
            {
                MessageBox.Show("Data Added Successfully");
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
Beispiel #3
0
        private void buttonClickToUpdate_Click(object sender, EventArgs e)
        {
            JobOpenings job = new JobOpenings();

            job.JobID             = int.Parse(VacanciesTable.SetValueForText1);
            job.MinExperience     = int.Parse(textMinExperience.Text);
            job.JobDescription    = textJobDiscription.Text;
            job.ExpectedStartDate = textExpectedStartDate.Text;
            job.Designation       = textDesignation.Text;
            job.Department        = textDepartment.Text;

            job.Department = textDepartment.Text;
            int result = JobOpeningDBHelper.UpdateJob(job);

            if (result > 0)
            {
                MessageBox.Show("Data Updated Successfully");
            }
            else
            {
                MessageBox.Show("Error");
            }
        }