예제 #1
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            errorProvider.Clear();
            Tipos telefono = new Tipos();

            int.TryParse(IDnumericUpDown.Text, out int id);

            if (TiposBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado");
            }
            else
            {
                errorProvider.SetError(IDnumericUpDown, "Tipo no Exite");
            }
        }
예제 #2
0
        private void Buscarbutton_Click(object sender, EventArgs e)
        {
            errorProvider.Clear();
            Tipos Telefono = new Tipos();

            int.TryParse(IDnumericUpDown.Text, out int id);

            Telefono = TiposBLL.Buscar(id);

            if (Telefono != null)
            {
                MessageBox.Show("Tipo no Encotrado");
                LlenaCampo(Telefono);
            }
            else
            {
                MessageBox.Show("Tipo no Encotrado");
            }
        }
예제 #3
0
 protected void btnGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         Tipos objTipos = new Tipos();
         objTipos.IDTipoInmueble = int.Parse(Session["IDTipo"].ToString());
         objTipos.Tipo           = txtTipo.Text;
         objTipos.Padre          = txtPadre.Text;
         objTipos.Menu           = txtMenu.Text;
         objTipos.Mostrar        = rbMostrar.SelectedValue;
         TiposBLL bllTipos = new TiposBLL();
         if (objTipos.IDTipoInmueble == 0)
         {
             bllTipos.InsertTipoDeInmuebles(objTipos);
         }
         else
         {
             bllTipos.UpdateTipoDeInmuebles(objTipos);
         }
         Response.Redirect("TipoPropiedades.aspx");
     }
     catch { }
 }
 private void LlenarComboBox()
 {
     tipoIdComboBox.DataSource    = TiposBLL.GetList(x => true);
     tipoIdComboBox.ValueMember   = "TipoId";
     tipoIdComboBox.DisplayMember = "Descripcion";
 }
예제 #5
0
        public void GuardarTest()
        {
            var tiposUsuarios = new Models.TiposUsuarios();

            Assert.IsTrue(TiposBLL.Guardar(tiposUsuarios));
        }