示例#1
0
    protected void unbindResume()
    {
        //If there's no resume create a new one and default IsApproved to true
        if (targetResume == null)
        {
            targetResume = new msResume {
                IsApproved = true
            }
        }
        ;

        targetResume.Owner    = ConciergeAPI.CurrentEntity.ID;
        targetResume.Name     = tbName.Text;
        targetResume.IsActive = cbIsActive.Checked;

        if (fuUploadResume.HasFile)
        {
            targetResume.File = null;

            var file = new MemberSuiteFile
            {
                FileContents = fuUploadResume.FileBytes,
                FileName     = fuUploadResume.FileName,
                FileType     = fuUploadResume.FileName.EndsWith(".doc", StringComparison.CurrentCultureIgnoreCase) && fuUploadResume.PostedFile.ContentType == "application/octet-stream" ? "application/msword" : fuUploadResume.PostedFile.ContentType
            };

            targetResume["File_Contents"] = file;
        }
    }
示例#2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (!IsValid)
        {
            return;
        }

        unbindResume();
        targetResume = SaveObject(targetResume).ConvertTo <msResume>();

        QueueBannerMessage(string.Format("Resume {0} has been saved successfully.", targetResume.LocalID));
        GoTo("~/careercenter/ManageResumes.aspx");
    }
示例#3
0
    /// <summary>
    /// Initializes the target object for the page
    /// </summary>
    /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing
    /// an event, the target object is an event. When looking up a directory, that's the target
    /// object. This method is intended to be overriden to initialize the target object for
    /// each page that needs it.</remarks>
    protected override void InitializeTargetObject()
    {
        base.InitializeTargetObject();

        //If there's no resume create a new one and default IsApproved to true
        targetResume = new msResume {
            IsApproved = true
        };

        if (!string.IsNullOrWhiteSpace(ContextID))
        {
            targetResume = LoadObjectFromAPI <msResume>(ContextID);
            if (targetResume == null)
            {
                GoToMissingRecordPage();
                return;
            }
        }
    }