private void btnSumar_Click(object sender, EventArgs e) { Suma sum = new Suma(); clsSuma clsSum = new clsSuma(); sum.Dato1 = Convert.ToDouble(value: txtD1.Text); sum.Dato2 = Convert.ToDouble(value: txtD2.Text); Double Res = clsSum.suma(sum); txtRes.Text = Res.ToString(); }
private void btnAcc_Click(object sender, EventArgs e) { frmSuma frms = new frmSuma(); Suma sumar = new Suma(); clsSuma clsSumar = new clsSuma(); sumar.User = txtUser.Text; sumar.Pass = txtContra.Text; Boolean correc = clsSumar.entrar(sumar); if (correc == true) { MessageBox.Show("WELCOME"); frms.Show(); } else { MessageBox.Show("Stop"); } }