private void _CargarCategoria() { var BL = new tb_me_categoriaplanillaBL(); var BE = new tb_me_categoriaplanilla(); var tbCategoria = new DataTable(); tbCategoria = BL.GetAll(EmpresaID, BE).Tables[0]; if (tbCategoria.Rows.Count > 0) { cmb_categoria.DataSource = tbCategoria; cmb_categoria.ValueMember = "cateplanid"; cmb_categoria.DisplayMember = "cateplanname"; } }
void CargarCateplan() { tb_me_categoriaplanillaBL BL = new tb_me_categoriaplanillaBL(); tb_me_categoriaplanilla BE = new tb_me_categoriaplanilla(); DataTable dt = new DataTable(); dt = BL.GetAll(EmpresaID, BE).Tables[0]; if (dt.Rows.Count > 0) { cmb_cateplan.DataSource = dt; cmb_cateplan.DisplayMember = "cateplanname"; cmb_cateplan.ValueMember = "cateplanid"; } }
private void data_Tablacategoria() { try { if (Tablacategoria.Rows.Count > 0) { Tablacategoria.Rows.Clear(); } var BL = new tb_me_categoriaplanillaBL(); var BE = new tb_me_categoriaplanilla(); BE.cateplanname = txtbusqueda.Text.Trim().ToUpper(); Tablacategoria = BL.GetAll(EmpresaID, BE).Tables[0]; if (Tablacategoria.Rows.Count > 0) { btn_imprimir.Enabled = true; dgb_catplanilla.DataSource = Tablacategoria; dgb_catplanilla.Rows[0].Selected = false; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }