Esempio n. 1
0
 protected void abc_Click(object sender, EventArgs e)
 {
     if (sender == Button1)
     {
         TextBox3.Text = (cal.sum(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text))).ToString();
     }
     else if (sender == Button2)
     {
         TextBox3.Text = (cal.mul(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text))).ToString();
     }
     else if (sender == Button3)
     {
         TextBox3.Text = (cal.sub(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text))).ToString();
     }
     else
     {
         TextBox3.Text = (cal.div(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text))).ToString();
     }
 }
Esempio n. 2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     TextBox3.Text = (cal.sum(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text))).ToString();
 }