private void BtnDeleteProfile_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Are sure to delete this Profile?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dr == DialogResult.Yes) { try { JobSeekerRepo.DeleteJobseekerjob(this.Id); EducationalQualificationRepo.DeleteEducationInfo(this.Id); JobSeekerRepo.DeleteJobSeeker(this.Id); MessageBox.Show("Profile deleted!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.BackHome(); this.Dispose(); } else { return; } }
private void BtnSearchJobSeeker_Click(object sender, EventArgs e) { if (Validation.IsDouble(this.txtSearchJobSeekerCGPA.Text, this.txtCgpa2.Text)) { this.Cgpa1 = Convert.ToDouble(this.txtSearchJobSeekerCGPA.Text); this.Cgpa2 = Convert.ToDouble(this.txtCgpa2.Text); } this.Max = Math.Max(this.Cgpa1, this.Cgpa2).ToString(); this.Min = Math.Min(this.Cgpa1, this.Cgpa2).ToString(); string sql = JobSeekerRepo.SearchJobSeeker(this.txtSearchJobSeekerName.Text, this.txtSearchJobSeekerBoard.Text, this.Min, this.Max); this.PopulateDGVJobSeekers(sql); }
private void BtnApply_Click(object sender, EventArgs e) { string sql; try { JobSeekerRepo.InsertJobssekerJob(this.JobSeekerId, this.JobId.ToString()); MessageBox.Show("Application Sent Successfully!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch { MessageBox.Show("You have applied already!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }
private void SetAll() { this.JobId = Convert.ToInt32(this.Row.Cells[0].Value); this.Title = this.lblOutputTitle.Text = this.Row.Cells[1].Value.ToString(); this.Type = this.lblOutputType.Text = this.Row.Cells[2].Value.ToString(); this.Category = this.lblOutputCategory.Text = this.Row.Cells[3].Value.ToString(); this.Description = this.lblOutputDescription.Text = this.Row.Cells[4].Value.ToString(); this.Vacancy = Convert.ToUInt16(this.Row.Cells[5].Value); this.lblOutputVacancy.Text = this.Vacancy.ToString(); string[] deadline = this.Row.Cells[6].Value.ToString().Split(' '); this.DeadLine = this.lblOutputDeadline.Text = deadline[0]; this.Address = this.lblOutputAddress.Text = this.Row.Cells[7].Value.ToString(); this.Salary = Convert.ToDouble(this.Row.Cells[8].Value); this.lblOutputSalary.Text = this.Salary.ToString(); this.CompanyId = this.Row.Cells[9].Value.ToString(); this.CompanyDs = CompanyRepo.GetAll(this.CompanyId); this.lblOutputCompanyName.Text = this.CompanyDs.Tables[0].Rows[0]["name"].ToString(); string sql = JobSeekerRepo.GetAppliedJobSeeker(this.JobId); this.PopulateDGVAppliedJobSeekers(sql); }
private bool ValidateLogin() { string sql; try { if (this.Id.StartsWith("C-")) { this.User = "******"; sql = CompanyRepo.CompanySignIn(this.Id, this.Password); } else if (this.Id.StartsWith("JS-")) { this.User = "******"; sql = JobSeekerRepo.JobSeekerSignIn(this.Id, this.Password); } else { MessageBox.Show("User Id is incorrect.\nTry Again.", "Not Found!!", MessageBoxButtons.OK, MessageBoxIcon.Hand); return(false); } this.Ds = DataAccess.ExecuteQuery(sql); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } if (this.Ds.Tables[0].Rows.Count == 1) { return(true); } else { MessageBox.Show("User Doesn't Exists", "Not Found!", MessageBoxButtons.OK, MessageBoxIcon.Stop); return(false); } }
private void TxtSearchJobSeekerBoard_TextChanged(object sender, EventArgs e) { string sql = JobSeekerRepo.SearchJobSeekerByBoard(this.txtSearchJobSeekerBoard.Text); this.PopulateDGVJobSeekers(sql); }
private void BtnSaveJobSeekerProfile_Click(object sender, EventArgs e) { this.Name = this.txtJobSeekerName.Text; this.Password = this.txtJobSeekerPassword.Text; this.Address = this.txtJobSeekerAddress.Text; this.ContactNo = this.txtJobSeekerContactNo.Text; this.Email = this.txtJobSeekerEmail.Text; if (rbFemale.Checked == true) { this.Gender = this.rbFemale.Text; } else if (rbMale.Checked == true) { this.Gender = this.rbMale.Text; } else { this.Gender = null; } this.DateOfBirth = this.dtJobSeekerDateOfBirth.Text; this.Skills = this.txtJobSeekerSkills.Text; this.BloodGroup = this.cmbBloodGroup.Text; if (this.txtJobSeekerExperience.Text == "") { this.Experience = 0; } else { this.Experience = Convert.ToInt32(this.txtJobSeekerExperience.Text); } if (this.JobSeekerPhotoSelected) { if (Validation.Text(this.Name, this.Password, this.Address, this.ContactNo, this.Email, this.Gender, this.DateOfBirth.ToString(), this.BloodGroup, this.Skills)) { if (Validation.ValidEmail(this.Email) && Validation.IsNumber(this.ContactNo)) { string sql; if (this.JobSeekerSerial != 0) { try { JobSeekerRepo.InsertJobseeker(this.JobSeekerId, this.Password, this.Name, this.Address, this.ContactNo, this.Email, this.Gender, this.DateOfBirth, this.BloodGroup, this.Skills, this.Experience.ToString(), this.JobSeekerPhotoPath); MessageBox.Show("Account Created SuccessFully!\nYour ID is " + this.JobSeekerId, "Message!", MessageBoxButtons.OK, MessageBoxIcon.Information); DataAccess.UpdateJobSeekerSerial(); this.pnlAddEducationalBackGround.Visible = true; this.Back(); this.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { try { JobSeekerRepo.UpdateJobseeker(this.Password, this.Name, this.Address, this.ContactNo, this.Email, this.Gender, this.DateOfBirth, this.BloodGroup, this.Skills, this.Experience.ToString(), this.JobSeekerPhotoPath, this.JobSeekerId); MessageBox.Show("Profile Updated, You need to sign in again!", "Info!", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { new SigninForm(this.Back).Visible = true; this.DestroyJobSeeker(); this.Dispose(); } } } else { MessageBox.Show("Email or Contact number is not in valid format", "'Format Issue!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } else { MessageBox.Show("All the boxes are required to fillup.", "Message!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } else { MessageBox.Show("Please upload a Profile photo", "Message!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }