Exemplo n.º 1
0
        public void TestMethod1()
        {
            var    c         = new NVentanilla();
            string ubicacion = "A17";
            string tipo      = "VIP";
            var    exp       = c.insertarVentanilla(ubicacion, tipo);

            Assert.AreEqual(exp, c.insertarVentanilla("A17", "VIP"));
        }
Exemplo n.º 2
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (this.txtUbicacion.Text == "" || this.cmbTipo.SelectedIndex == -1)
            {
                MessageBox.Show("Campos Faltantes o Datos Erróneos", "Error al Guardar Ventanilla", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                NVentanilla oVneg = new NVentanilla();

                string ubicacion = this.txtUbicacion.Text.ToUpper();
                string tipo      = this.cmbTipo.SelectedItem.ToString();

                string rpta = oVneg.insertarVentanilla(ubicacion, tipo);

                if (rpta.Equals("OK"))
                {
                    MessageBox.Show("Ventanilla Registrada", "Guardar Ventanilla", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show(rpta, "Error al Guardar Ventanilla", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

                this.limpiar();
                this.inicial();
            }
        }