Beispiel #1
0
 private void btnActualizar_Click(object sender, EventArgs e)
 {
     try
     {
         EleganciaService.Productos Listado = new EleganciaService.Productos();
         dataGridView1.DataSource = Listado.Sucursales().Tables[0];
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error: " + ex.Message, "Conexión", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     EleganciaService.Productos Test = new EleganciaService.Productos();
     try
     {
         string test = Test.HelloWorld();
         if (test != null)
         {
             lblTest.Text = "Conexión correcta.";
         }
         else
         {
             lblTest.Text = "Conexión no disponible.";
         }
     }
     catch (Exception ex)
     {
         lblTest.Text = "Error: " + ex.Message;
     }
 }
Beispiel #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     EleganciaService.Productos Test = new EleganciaService.Productos();
     try
     {
         string test = Test.HelloWorld();
         if (test != null)
         {
             MessageBox.Show("Conexión correcta.", "Conexión", MessageBoxButtons.OK);
         }
         else
         {
             MessageBox.Show("Conexión no disponible.", "Conexión", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            string Nombre = textBox1.Text;

            if (Nombre == null)
            {
                MessageBox.Show("El sku es numérico.", "Alerta", MessageBoxButtons.OK);
            }
            else
            {
                try
                {
                    EleganciaService.Productos xListado = new EleganciaService.Productos();
                    dataGridView1.DataSource = xListado.ExistenciaNombre(textBox1.Text).Tables[0];
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: " + ex.Message, "Alerta", MessageBoxButtons.OK);
                }
            }
        }
Beispiel #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            bool bSku = false;
            int  sku  = 0;

            bSku = int.TryParse(textBox1.Text, out sku);
            if (bSku == false)
            {
                MessageBox.Show("El sku es numérico.", "Alerta", MessageBoxButtons.OK);
            }
            else
            {
                try
                {
                    EleganciaService.Productos xListado = new EleganciaService.Productos();
                    dataGridView1.DataSource = xListado.Existencia(int.Parse(textBox1.Text)).Tables[0];
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: " + ex.Message, "Alerta", MessageBoxButtons.OK);
                }
            }
        }