Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace WebApplication15
- {
- public partial class WebForm1_back : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- String hour;
- string teplota, vlhkost, tlak, svetlo, zrazky, vyska;
- hour = DateTime.Now.ToString("HH");
- uint n_hour = Convert.ToUInt32(hour);
- teplota = Request.QueryString["teplota"];
- vlhkost = Request.QueryString["vlhkost"];
- tlak = Request.QueryString["tlak"];
- svetlo = Request.QueryString["svetlo"];
- vyska = Request.QueryString["vyska"];
- zrazky = Request.QueryString["zrazky"];
- using (StreamWriter writer = new StreamWriter("D:\\home\\site\\wwwroot\\TextFile1.txt"))
- {
- writer.WriteLine(teplota);
- writer.WriteLine(vlhkost);
- writer.WriteLine(tlak);
- writer.WriteLine(svetlo);
- writer.WriteLine(vyska);
- writer.WriteLine(zrazky);
- }
- if (4 < n_hour + 1 && n_hour + 1 < 10)
- {
- rezim.Text = "0";
- }
- else if (10 < n_hour + 1 && n_hour + 1 < 20)
- {
- rezim.Text = "1";
- }
- else
- {
- rezim.Text = "2";
- }
- uint n_zrazky = Convert.ToUInt32(zrazky);
- uint n_teplota = Convert.ToUInt32(teplota);
- if (n_zrazky < 1000 && n_teplota <= 0)
- {
- this.zrazky.Text = "0";
- }
- else if (n_zrazky < 1000 && n_teplota > 1)
- {
- this.zrazky.Text = "1";
- }
- else
- {
- this.zrazky.Text = "2";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement