Esempio n. 1
0
        protected void btnDownloadCV_Click(object sender, EventArgs e)
        {
            jobseeker CV             = new jobseeker();
            string    JobseekerEmail = User.Identity.Name;

            byte[] data = CV.GetCV(JobseekerEmail);
            // Open binary data in word .doc format
            Response.Clear();
            Response.Buffer      = true;
            Response.ContentType = "application/vnd.ms-word";
            Response.AddHeader("content-disposition", "attachment;filename=CV.doc");
            Response.Charset = "";
            Response.Cache.SetCacheability(HttpCacheability.NoCache);

            Response.BinaryWrite(data);
            Response.End();
        }
Esempio n. 2
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            bool flag = false;

            Byte[] CV = fiuCV.FileBytes;
            if ((Convert.ToInt32(fiuCV.PostedFile.ContentLength.ToString()) < 131072) && fiuCV.PostedFile.FileName.EndsWith(".doc"))
            {
                jobseeker uploadCV = new jobseeker();
                flag = uploadCV.UploadCV(CV, User.Identity.Name);
            }

            if (flag)
            {
                lblMessage.Text      = "CV successfully uploaded";
                lblMessage.ForeColor = System.Drawing.Color.Green;
                lblMessage.Visible   = true;
            }
            else
            {
                lblMessage.Text      = "CV upload failed. Please ensure CV file is of type MS Word 2003 .doc format and smaller than 128kb";
                lblMessage.ForeColor = System.Drawing.Color.Red;
                lblMessage.Visible   = true;
            }
        }
Esempio n. 3
0
        protected void LoadLabels()
        {
            jobseeker seekerDetails = new jobseeker();
            DataTable jobseekerTbl  = seekerDetails.GetJobseekerEmail(User.Identity.Name);
            Format    format        = new Format();

            lblJobseekerIDBind.Text             = format.GetJobseekerIdFormat(jobseekerTbl.Rows[0]["ID"].ToString());
            lblJobseekerIDBind.Visible          = true;
            lblEmailBind.Text                   = jobseekerTbl.Rows[0]["Email"].ToString();
            lblEmailBind.Visible                = true;
            lblFNameBind.Text                   = jobseekerTbl.Rows[0]["FirstName"].ToString();
            lblFNameBind.Visible                = true;
            lblLNameBind.Text                   = jobseekerTbl.Rows[0]["LastName"].ToString();
            lblLNameBind.Visible                = true;
            lblCountryBind.Text                 = jobseekerTbl.Rows[0]["Country"].ToString();
            lblCountryBind.Visible              = true;
            lblCountryHidden.Text               = jobseekerTbl.Rows[0]["CountryID"].ToString();
            lblCountryHidden.Visible            = false;
            lblRegionBind.Text                  = jobseekerTbl.Rows[0]["Region"].ToString();
            lblRegionBind.Visible               = true;
            lblRegionHidden.Text                = jobseekerTbl.Rows[0]["RegionID"].ToString();;
            lblRegionHidden.Visible             = false;
            lblLocationBind.Text                = jobseekerTbl.Rows[0]["Location"].ToString();
            lblLocationBind.Visible             = true;
            lblLocationHidden.Text              = jobseekerTbl.Rows[0]["LocationID"].ToString();
            lblLocationHidden.Visible           = false;
            lblNationalityBind.Text             = jobseekerTbl.Rows[0]["Nationality"].ToString();
            lblNationalityBind.Visible          = true;
            lblNationalityHidden.Text           = jobseekerTbl.Rows[0]["NationalityID"].ToString();
            lblNationalityHidden.Visible        = false;
            lblContactNumberBind.Text           = jobseekerTbl.Rows[0]["ContactNumber"].ToString();
            lblContactNumberBind.Visible        = true;
            lblPassportIDBind.Text              = jobseekerTbl.Rows[0]["ID_Passport"].ToString();
            lblPassportIDBind.Visible           = true;
            lblDesiredJobCategoryBind.Text      = jobseekerTbl.Rows[0]["Category"].ToString();
            lblDesiredJobCategoryBind.Visible   = true;
            lblDesiredJobCategoryHidden.Text    = jobseekerTbl.Rows[0]["CategoryID"].ToString();
            lblDesiredJobCategoryHidden.Visible = false;
            lblEducationBind.Text               = jobseekerTbl.Rows[0]["Education"].ToString();
            lblEducationBind.Visible            = true;
            lblEducationHidden.Text             = jobseekerTbl.Rows[0]["EducationID"].ToString();
            lblEducationHidden.Visible          = false;
            lblWorkExperienceBind.Text          = jobseekerTbl.Rows[0]["Experience"].ToString();
            lblWorkExperienceBind.Visible       = true;
            lblJobseekerStatusBind.Text         = jobseekerTbl.Rows[0]["Status"].ToString();
            lblJobseekerStatusBind.Visible      = true;
            lblJobseekerStatusHidden.Text       = jobseekerTbl.Rows[0]["StatusID"].ToString();
            lblJobseekerStatusHidden.Visible    = false;



            txtFName.Visible           = false;
            txtLName.Visible           = false;
            ddlCountry.Visible         = false;
            ddlRegion.Visible          = false;
            ddlLocation.Visible        = false;
            ddlNationality.Visible     = false;
            txtContactNumber.Visible   = false;
            txtIDPassport.Visible      = false;
            ddlDesiredCategory.Visible = false;
            ddlEducation.Visible       = false;
            ddlWorkExperience.Visible  = false;
            ddlStatus.Visible          = false;

            btnCancel.Enabled = false;
            btnDelete.Enabled = true;
            btnEdit.Enabled   = true;
            btnUpdate.Enabled = false;
        }