private void FillCombo() { listRazones.Items.Clear(); listRazones.SelectedValueChanged += ListRazones_SelectedValueChanged; var razon = razonesDTO.GetRazones(); for (int i = 0; i < razon.Rows.Count; i++) { Models.Razones rz = new Models.Razones { IdRazon = Convert.ToInt32(razon.Rows[i]["IdRazon"]), Razon = razon.Rows[i]["Razon"].ToString() }; listRazones.Items.Add(rz.Razon); } }
private void FillRazones() { RazonesDTO objDTO = new RazonesDTO(); gridRazones.DataSource = objDTO.GetRazones(); }