コード例 #1
0
ファイル: serviceAdd.cs プロジェクト: Juanda96/Ferreteria
 private void btnWelcome_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtId.Text) || string.IsNullOrEmpty(txtName.Text) || string.IsNullOrEmpty(txtCateg.Text) || string.IsNullOrEmpty(txtDescrip.Text) || string.IsNullOrEmpty(txtPrice.Text))
     {
         MessageBox.Show("Error: información incompleta");
     }
     else
     {
         sbo.createServ(int.Parse(txtId.Text), txtName.Text, txtCateg.Text, txtDescrip.Text, int.Parse(txtPrice.Text));
         MessageBox.Show("¡Agregado con exito!");
     }
 }