예제 #1
0
        private AddMediaResponse AddMediaMapping(string url, string linkid, int TypeId, int MediaContext, string saediFromid, MediaUpload mediaresult)
        {
            AddMediaResponse mediaresponse = new AddMediaResponse();

            onlineClient.Url = url;
            TMedia tmedia = new TMedia();

            tmedia.MSGUID         = mediaresult.mediauploadResponse.MSGUID;
            tmedia.TypeID         = mediaresult.mediauploadRequest.TypeID;
            tmedia.MediaTimeStamp = mediaresult.mediauploadRequest.TimeStamp;
            tmedia.MediaText      = mediaresult.mediauploadRequest.Notes;
            tmedia.MediaSubject   = mediaresult.mediauploadRequest.Notes;
            tmedia.MediaPrivateFg = mediaresult.mediauploadRequest.MediaPrivateFg;
            tmedia.MediaExtension = mediaresult.mediauploadRequest.MediaExtension;
            tmedia.MediaContext   = mediaresult.mediauploadRequest.ContextID;
            tmedia.FileName       = mediaresult.mediauploadRequest.FileName;
            tmedia.LinkID         = mediaresult.mediauploadRequest.LinkId;


            TAddMediaResponse mediaResponse = onlineClient.AddMedia(tmedia);

            //mapping media
            onlineBookingLogBLL.InsertOnlineServiceLog(tmedia, mediaResponse, saediFromid, url, mediaResponse.ErrorCode != 0);


            mediaresponse.ErrorCode = mediaResponse.ErrorCode;
            mediaresponse.ErrorText = mediaResponse.ErrorText;



            return(mediaresponse);
        }
예제 #2
0
        public void AddMediaMapping(string url, string guid, bool mediaPrivateFg, string mediaExtension, string notes, int linkId, int typeId, int mediaContext, string saediFromid)
        {
            onlineClient.Url = url;
            TMedia tmedia = new TMedia();

            tmedia.MSGUID         = guid;
            tmedia.TypeID         = typeId;
            tmedia.MediaTimeStamp = DateTime.Now.ToString();
            tmedia.MediaText      = notes;
            tmedia.MediaSubject   = notes;
            tmedia.MediaPrivateFg = mediaPrivateFg;
            tmedia.MediaExtension = mediaExtension;
            tmedia.MediaContext   = mediaContext;
            tmedia.FileName       = string.Format("{0}_{1}.{2}", saediFromid, DateTime.Now.ToString("yyyyMMddHHmmssfff"), mediaExtension);
            tmedia.LinkID         = linkId;
            onlineClient.AddMedia(tmedia);
        }