예제 #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();
     }
 }
예제 #2
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox3.Text = (cal.sub(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text))).ToString();
 }