protected void Button1_Click(object sender, EventArgs e) { WebService1 webService = new WebService1(); if (NameClient.Text != "" && LastnameClient.Text != "" && CardNumberClient.Text != "" && PhoneClient.Text != "" && EmailClient.Text != "" && PasswordClient.Text != "") { if (webService.ClientExists(NameClient.Text, LastnameClient.Text, (int)Convert.ToInt64(CardNumberClient.Text), (int)Convert.ToInt32(PhoneClient.Text), EmailClient.Text, PasswordClient.Text, Convert.ToInt32(Session["valor1"])).Equals(true)) { //dialog exite client } else { webService.AddClient(NameClient.Text, LastnameClient.Text, (int)Convert.ToInt32(CardNumberClient.Text), (int)Convert.ToInt32(PhoneClient.Text), PasswordClient.Text, Convert.ToInt32(Session["valor1"]), EmailClient.Text); int idClient = webService.GetIdClientExists(NameClient.Text, LastnameClient.Text, (int)Convert.ToInt32(CardNumberClient.Text), (int)Convert.ToInt32(PhoneClient.Text), PasswordClient.Text, Convert.ToInt32(Session["valor1"])); webService.AddLogin(EmailClient.Text, PasswordClient.Text, "client", idClient); ListBoxClients(); } } else { //dialog que esta vacio } }