SaveImage() public method

public SaveImage ( long subjectID, byte image, XmlDocument PropertyListXML ) : bool
subjectID long
image byte
PropertyListXML System.Xml.XmlDocument
return bool
        protected void ProcessUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
        {
            System.IO.Stream      stream;
            Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            stream = AsyncFileUpload1.PostedFile.InputStream;


            byte[] imageBytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length + 1];
            AsyncFileUpload1.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length);

            data.SaveImage(this.SubjectID, imageBytes, this.PropertyListXML);
            base.GetSubjectProfile();
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false);
            this.DrawProfilesModule();

            InitLinks();
            pnlUpload.Visible = false;
            upnlEditSection.Update();
        }
        protected void ProcessUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
        {
            try {
            System.IO.Stream stream;
            Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            stream = AsyncFileUpload1.PostedFile.InputStream;

            byte[] imageBytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length + 1];
            AsyncFileUpload1.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length);

            data.SaveImage(data.GetPersonID(this.SubjectID), imageBytes);
            base.GetSubjectProfile();
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false);
            this.DrawProfilesModule();

            InitLinks();
            pnlUpload.Visible = false;
            this.KillCache();
            upnlEditSection.Update();
                }
            catch (Exception ex) {
                Framework.Utilities.DebugLogging.Log(ex.Message + " " + ex.StackTrace);
                throw new Exception(ex.Message);
            }
        }
        protected void ProcessUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
        {
            System.IO.Stream stream;
            Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            stream = AsyncFileUpload1.PostedFile.InputStream;

            byte[] imageBytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length + 1];
            AsyncFileUpload1.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length);

            data.SaveImage(this.SubjectID, imageBytes, this.PropertyListXML);
            base.GetSubjectProfile();
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false);
            this.DrawProfilesModule();

            InitLinks();
            pnlUpload.Visible = false;
            upnlEditSection.Update();
        }