protected void Button1_Click(object sender, EventArgs e)
        {
            var ft = new FileTransmute.FileHandlerSoapClient();

            /*
             * Byte[] fileByteStream, string documentName, string emailAddress, string downloadURL, string abstractionMethod, string classSeperator,
             * int binsNumber, bool abstractedSeries, string datasetName, Byte[] vmap
             */
            Byte[] fb = FileUploadTargetFile.FileBytes;
            Byte[] vmap;

            string url = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority +
                         this.TemplateSourceDirectory + "/Download.aspx";
            string completedRequest = "";

            try
            {
                completedRequest = ft.RunKarmaLego(fb, TextBoxDatasetName.Text, TextBoxEmail.Text, url,
                                                   System.Int32.Parse(TextBoxMinVSup.Text), System.Int32.Parse(TextBoxMaxGap.Text), System.Int32.Parse(TextBoxEpsilon.Text), CheckBoxHSup.Checked);
            }
            catch (Exception exception)
            {
            }


            if (!string.IsNullOrEmpty(completedRequest))
            {
                this.Label1.Text = "<a href=" + url + "/?dl=" + completedRequest + ">Your file can be found here</a>";
            }
            else
            {
                this.Label1.Text = "A link to your file will be sent to you via the email you provided";
            }
            this.Label1.Visible = true;
        }
Example #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=\"JavaScript\">alert(\"Discretisation Recieved!\")</SCRIPT>");
            var ft = new FileTransmute.FileHandlerSoapClient();

            /*
             * Byte[] fileByteStream, string documentName, string emailAddress, string downloadURL, string abstractionMethod, string classSeperator,
             * int binsNumber, bool abstractedSeries, string datasetName, Byte[] vmap
             */
            Byte[] fb = FileUploadTargetFile.FileBytes;
            Byte[] vmap;
            if (FileUploadVariableMap.HasFile)
            {
                vmap = FileUploadVariableMap.FileBytes;
            }
            else
            {
                vmap = null;
            }

            string url = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority +
                         this.TemplateSourceDirectory + "/Download.aspx";
            string completedRequest = "";

            try
            {
                ArrayOfString abstractionMethods = GetMethods();
                completedRequest = ft.RunTD4C(fb, FileUploadTargetFile.FileName, TextBoxEmail.Text, url, abstractionMethods, TextBoxClassSearator.Text,
                                              System.Convert.ToInt32(TextBoxBinsNumber.Text), CheckBoxAbstractedTimeSeries.Checked, TextBoxDatasetName.Text, vmap);
            }
            catch (Exception exception)
            {
            }


            if (!string.IsNullOrEmpty(completedRequest))
            {
                this.Label1.Text = "<a href=" + url + "/?dl=" + completedRequest + ">Your file can be found here</a>";
            }
            else
            {
                this.Label1.Text = "A link to your file will be sent to you via the email you provided";
            }
            this.Label1.Visible = true;
        }