private void Llenar_cboSistPensiones() { cmbafp.ValueMember = "regipenid"; cmbafp.DisplayMember = "regipenname"; var BL = new tb_plla_pdt_tabla11BL(); var BE = new tb_plla_pdt_tabla11(); cmbafp.DataSource = BL.GetAll(VariablesPublicas.EmpresaID, BE).Tables[0]; }
private BindingSource NewMethodoAfp() { var BL = new tb_plla_pdt_tabla11BL(); var BE = new tb_plla_pdt_tabla11(); BE.status = "A"; var table = BL.GetAll(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0]; var rows = table.Rows; object[] cell; var dic = new Dictionary<string, string>(); var binding = new BindingSource(); foreach (DataRow item in rows) { cell = item.ItemArray; dic.Add(cell[0].ToString(), cell[0].ToString() + " - " + cell[1].ToString()); cell = null; } binding.DataSource = dic; return binding; }