protected void Button1_Click(object sender, EventArgs e)
    {
        String zipcode = TextBox1.Text;

        ServiceReference2.Service1Client myClient = new ServiceReference2.Service1Client();
        ArrayList weatherReport = new ArrayList(myClient.Weather5day(zipcode));
        string    report        = "";
        string    report2       = "";
        int       i             = 0;

        //System.Diagnostics.Debug.WriteLine("hereeeeeeeeeeeeee");
        if (weatherReport[i].Equals("Point is not on NDFD grid"))
        {
            Label1.Text  = (string)weatherReport[0];
            Label14.Text = "Enter a Valid Zipcode of USA";
        }
        else
        {
            while (i < weatherReport.Count && !weatherReport[i].Equals("Daily Minimum Temperature"))
            {
                report = report + " " + weatherReport[i];
                System.Diagnostics.Debug.WriteLine(report);
                i++;
            }
            while (i < weatherReport.Count)
            {
                report2 = report2 + " " + weatherReport[i];
                i++;
            }
            Label1.Text  = report;
            Label14.Text = report2;
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        String latLon = TextBox2.Text;

        String[] arr = latLon.Split(',');
        decimal  lat, lon;

        Decimal.TryParse(arr[0], out lat);
        Decimal.TryParse(arr[1], out lon);
        ServiceReference2.Service1Client myClient = new ServiceReference2.Service1Client();
        //bool b = true;
        int no = 0;

        try
        {
            no = myClient.Crimedata(lat, lon);
        }
        catch (FaultException msg)
        {
            Label4.Text = msg.Message;
        }

        if (no == -1)
        {
            Label4.Text = "Please Enter Latitude and Longitude for Valid Place in USA. Data for this latitude and longitude does not exists.";
        }
        else
        {
            String num = no.ToString();
            Label4.Text = num;
        }
    }
Exemple #3
0
    protected void Button2_Click1(object sender, EventArgs e)
    {
        ServiceReference2.Service1Client sc = new ServiceReference2.Service1Client();
        string result   = sc.transformation(TextBox3.Text, TextBox4.Text);
        string dataFile = HostingEnvironment.ApplicationPhysicalPath + "\\hotels.html";

        System.IO.File.WriteAllText(@dataFile, result);

        System.Diagnostics.Process.Start(dataFile);
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        RadHtmlChartGroupDataSource.GroupDataSource(RadHtmlChart1, GetRawDataSource1(), "Year", "AreaSeries", "Sales", "Quarter");
        RadHtmlChartGroupDataSource.GroupDataSource(RadHtmlChart4, GetRawDataSourcePurchase(), "Year", "LineSeries", "Sales", "Quarter");
        RadHtmlChartGroupDataSource.GroupDataSource(RadHtmlChart2, GetRawDataSourceRevenue(), "Category", "ColumnSeries", "Sales", "Quarter");

        ServiceReference2.Service1Client sc = new ServiceReference2.Service1Client();
        var a = sc.GetSaleData();

        RadHtmlChart3.DataSource = a;
        RadHtmlChart3.DataBind();
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //ServiceReference1 sr = new ServiceReference1();

        ServiceReference2.Service1Client sc = new ServiceReference2.Service1Client();
        var a = sc.GetSaleData();

        RadHtmlChart1.DataSource = a;
        RadHtmlChart1.DataBind();

        RadHtmlChartGroupDataSource.GroupDataSource(RadHtmlChart2, GetRawDataSource(), "Year", "BarSeries", "Sales", "Quarter");
    }
Exemple #6
0
    private DataTable GetRawDataSource1()
    {
        DataTable dtDataPoints = new DataTable();

        dtDataPoints.Columns.Add(new DataColumn("Year", typeof(string)));
        dtDataPoints.Columns.Add(new DataColumn("Quarter", typeof(string)));
        dtDataPoints.Columns.Add(new DataColumn("Sales", typeof(int)));

        ServiceReference2.Service1Client sc = new ServiceReference2.Service1Client();
        var col = sc.GetQuarterlySales();

        foreach (ServiceReference2.SalesCommon element in col)
        {
            dtDataPoints.Rows.Add(new object[] { element.Year, element.Quarter, element.Sales });
        }

        return(dtDataPoints);
    }
Exemple #7
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string latitude  = TextBox1.Text;
        string longitude = TextBox2.Text;

        Cache["lat"] = latitude;
        Cache["lon"] = longitude;
        string q = "gas" + latitude + "," + longitude;

        if (Cache[q] != null)
        {
            Label1.Text = Cache[q].ToString();
            return;
        }
        ServiceReference2.Service1Client client = new ServiceReference2.Service1Client();
        Label1.Text = client.gasPrices(latitude, longitude);
        Cache[q]    = Label1.Text;
    }
 protected void Button2_Click(object sender, EventArgs e)
 {
     ServiceReference2.Service1Client weatherClient = new ServiceReference2.Service1Client();
     TextBox4.Text = weatherClient.removeStopWordsService(TextBox3.Text);
 }
Exemple #9
0
 public Service1Client(EndpointConfiguration endpointConfiguration, string remoteAddress) :
     base(Service1Client.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #10
0
 public Service1Client(EndpointConfiguration endpointConfiguration) :
     base(Service1Client.GetBindingForEndpoint(endpointConfiguration), Service1Client.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #11
0
 public Service1Client() :
     base(Service1Client.GetDefaultBinding(), Service1Client.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IService1.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #12
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(Service1Client.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IService1));
 }
Exemple #13
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(Service1Client.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IService1));
 }