Beispiel #1
0
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        BAJobSeeker    BAreg  = new BAJobSeeker();
        BEMemDetails   beMem  = new BEMemDetails();
        BEUpdateResume beresm = new BEUpdateResume();

        if (Session["PSJUID"].ToString() != "" || Session["PSJUID"].ToString() != null)
        {
            name        = Session["PSJUID"].ToString();
            beMem.email = name;
            ds          = BAreg.getMemDetails(beMem);
        }

        if (uploadFile.HasFile)
        {
            if (uploadFile.PostedFile.ContentLength <= 1024000)
            {
                if (checkFileType(uploadFile.FileName))
                {
                    string ext = Path.GetExtension(uploadFile.FileName).ToLower();

                    uploadFile.SaveAs(ConfigurationManager.AppSettings["Resumes"].ToString() + ds.Tables[0].Rows[0]["id"] + ext);
                    beresm.filename = ext;
                    beresm.email    = name;
                    string ReturnMsg = BAreg.Updateresume(beresm);

                    if (ReturnMsg == "Success")
                    {
                        lblMsg.Text    = "Resume successfully updated.";
                        lblMsg.Visible = true;
                    }
                    else
                    {
                        lblMsg.Text    = "Error in updating the resume";
                        lblMsg.Visible = true;
                    }
                }
                else
                {
                    lblMsg.Text    = "Please upload your resume in .doc or .docx format only.";
                    lblMsg.Visible = true;
                }
            }

            else
            {
                lblMsg.Text    = "File size exceeded the maximum size limit. Please upload file having size below 1 megabyte.";
                lblMsg.Visible = true;
            }
        }
        else
        {
            lblMsg.Text    = "Please add the file to upload.";
            lblMsg.Visible = true;
        }
    }
Beispiel #2
0
 public string updateresume(BEUpdateResume beresm)
 {
     SqlParameter[] param = new SqlParameter[3];
     param[0]           = new SqlParameter("@filename", SqlDbType.NVarChar, 100);
     param[0].Value     = beresm.filename;
     param[1]           = new SqlParameter("@email", SqlDbType.NVarChar, 50);
     param[1].Value     = beresm.email;
     param[2]           = new SqlParameter("@message", SqlDbType.VarChar, 200);
     param[2].Direction = ParameterDirection.Output;
     SqlHelper.ExecuteNonQuery(connectionString, CommandType.StoredProcedure, "spsUpdateJobseekerResume", param);
     return(Convert.ToString(param[2].Value));
 }
Beispiel #3
0
 public string Updateresume(BEUpdateResume beresm)
 {
     return(DAreg.updateresume(beresm));
 }