コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: nkaluva/helper
        void Button1_Click(object sender, EventArgs e)
        {
            object obj1 = HttpContext.Current.Items["a"];

            if (FileUpload1.HasFile)
            {
                byte[] arr = FileUpload1.FileBytes;
                Response.Write(FileUpload1.FileName.Trim());
                localhost.Upload        upload  = new localhost.Upload();
                localhost.UploadRequest request = new localhost.UploadRequest()
                {
                    FileBytes       = arr,
                    SaveVirtualPath = "/Account/" + Guid.NewGuid() + FileUpload1.FileName
                };
                //


                localhost.UploadSoapHeader header = new localhost.UploadSoapHeader
                {
                    //AuthKey = "niejunhua"
                };


                upload.UploadSoapHeaderValue = header;
                localhost.UploadResult rs = upload.CallUpload(request);

                Response.Write("code=" + rs.Code + "<br>");
                Response.Write("Msg=" + rs.Msg + "<br>");
            }
        }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: nkaluva/helper
        void Button1_Click(object sender, EventArgs e)
        {
            object obj1 = HttpContext.Current.Items["a"];
            if (FileUpload1.HasFile)
            {
                byte[] arr = FileUpload1.FileBytes;
                Response.Write(FileUpload1.FileName.Trim());
                localhost.Upload upload = new localhost.Upload();
                localhost.UploadRequest request = new localhost.UploadRequest()
                {
                    FileBytes = arr,
                    SaveVirtualPath = "/Account/" + Guid.NewGuid() + FileUpload1.FileName
                };
                //


                localhost.UploadSoapHeader header = new localhost.UploadSoapHeader
                {
                    //AuthKey = "niejunhua"
                };


                upload.UploadSoapHeaderValue = header;
                localhost.UploadResult rs = upload.CallUpload(request);

                Response.Write("code=" + rs.Code + "<br>");
                Response.Write("Msg=" + rs.Msg + "<br>");
            }
        }
コード例 #3
0
        public UploadResult CallUpload(UploadRequest req)
        {
            object[] results = this.Invoke("CallUpload", new object[] {
                req
            });

            return((UploadResult)(results[0]));
        }
コード例 #4
0
 /// <remarks/>
 public void CallUploadAsync(UploadRequest req, object userState)
 {
     if ((this.CallUploadOperationCompleted == null))
     {
         this.CallUploadOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCallUploadOperationCompleted);
     }
     this.InvokeAsync("CallUpload", new object[] {
         req
     }, this.CallUploadOperationCompleted, userState);
 }
コード例 #5
0
ファイル: Reference.cs プロジェクト: nkaluva/helper
 /// <remarks/>
 public void CallUploadAsync(UploadRequest req, object userState) {
     if ((this.CallUploadOperationCompleted == null)) {
         this.CallUploadOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCallUploadOperationCompleted);
     }
     this.InvokeAsync("CallUpload", new object[] {
                 req}, this.CallUploadOperationCompleted, userState);
 }
コード例 #6
0
ファイル: Reference.cs プロジェクト: nkaluva/helper
 /// <remarks/>
 public void CallUploadAsync(UploadRequest req) {
     this.CallUploadAsync(req, null);
 }
コード例 #7
0
ファイル: Reference.cs プロジェクト: nkaluva/helper
 public UploadResult CallUpload(UploadRequest req) {
     object[] results = this.Invoke("CallUpload", new object[] {
                 req});
     return ((UploadResult)(results[0]));
 }
コード例 #8
0
 /// <remarks/>
 public void CallUploadAsync(UploadRequest req)
 {
     this.CallUploadAsync(req, null);
 }