NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io



// İSİMLİ SACMA BİSEY
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication3
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void add_Click(object sender, EventArgs e)
{
string[] values = new string[5] { "Bob", "Steve", "Chuck", "Briand", "Andy" };
ViewState.Add("MyValues", values);
Label1.Text = "Values added ...";
}

protected void retrieve_Click(object sender, EventArgs e)
{
string[] values = (string[])ViewState["MyValues"];
TextBox1.Text = values[0];
TextBox2.Text = values[1];
TextBox3.Text = values[2];
TextBox4.Text = values[3];
TextBox5.Text = values[4];
Label1.Text = "Value retrieved ...";
}

}
}



//DESTİNASYON

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication5
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string[] destinasyon = new string[0];
int[] katilimci = new int[0];
int[] sayi = new int[0];
ViewState.Add("DESTİNASYON", destinasyon);
ViewState.Add("KATILIMCI", katilimci);
ViewState.Add("SAYI", sayi);
}
}

protected void Button1_Click(object sender, EventArgs e)
{
string[] destinasyon = (string[])ViewState["DESTİNASYON"];
int[] katilimci = (int[])ViewState["KATILIMCI"];
int[] sayi = (int[])ViewState["SAYI"];
int uzunluk = destinasyon.Length;
Array.Resize(ref destinasyon, uzunluk + 1);
Array.Resize(ref katilimci, uzunluk + 1);
Array.Resize(ref sayi, uzunluk + 1);
int yeniSonIndis = destinasyon.Length - 1;
destinasyon[yeniSonIndis] = TextBox1.Text;
katilimci[yeniSonIndis] = int.Parse(TextBox2.Text);
sayi[yeniSonIndis] = int.Parse(TextBox3.Text);
ViewState["DESTİNASYON"] = destinasyon;
ViewState["KATILIMCI"] = katilimci;
ViewState["SAYI"] = sayi;
double ort = (double)katilimci.Sum() / sayi.Sum();
Label1.Text = String.Format("Toplam Katılımcı {0}</br>Ortalama Katılımcı {1:N2}</br>Son Destinasyon {2}", katilimci.Sum(), ort, destinasyon[yeniSonIndis]);


}
}
}



///İCECEKLER

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication4
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Secimler(object sender, EventArgs e)
{
hesapla();
}

private void hesapla()
{
int adet = 0;
if(TextBox1.Text.Trim().Length>0&&int.TryParse(TextBox1.Text,out adet))
{
if (RadioButton1.Checked)
{
Label1.Text = (adet * 1).ToString();
}
else if (RadioButton2.Checked)
{
Label1.Text = (adet * 3).ToString();
}
else if (RadioButton3.Checked)
{
Label1.Text = (adet * 8).ToString();
}
else if (RadioButton4.Checked)
{
Label1.Text = (adet * 10).ToString();
}
}
}
}
}




//HAVA KARA DENİZ


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void OrtakDinleyici(object sender, EventArgs e)
{
hesapla();
}

private void hesapla()
{
if (secimYapildiMi() && sayiGirildiMi())
{
double carpan = carpanBul();
double hacim = hacimBul();
double fiyat = hacim * carpan / 100;
Label1.Text = String.Format("Toplam Tutar {0}", fiyat);
}
else
{
Label1.Text = "Bir ulaşım yolu seçilmeli ve boyutların tamamı sayı olarak girilmelidir.";
}
}
private bool secimYapildiMi()
{
if (karaRB.Checked || havaRB.Checked || denizRB.Checked)
{
return true;
}
else
{
return false;
}
}
private bool sayiGirildiMi()
{
double a, b, c;
bool g = double.TryParse(genislikTB.Text, out a);
bool u = double.TryParse(uzunlukTB.Text, out b);
bool y = double.TryParse(yukseklikTB.Text, out c);
if (g && u && y)
return true;
else
return false;
}
private double carpanBul()
{
double carpan;
if (karaRB.Checked)
{
carpan = 5.5;
}
else if (havaRB.Checked)
{
carpan = 10;
}
else
{
carpan = 1; ;
}
return carpan;
}

private double hacimBul()
{
double genislik = double.Parse(genislikTB.Text);
double uzunluk = double.Parse(uzunlukTB.Text);
double yukseklik = double.Parse(yukseklikTB.Text);
double hacim = genislik * uzunluk * yukseklik;
return hacim;
}






}
}





     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.