private void CargarDepartamento_Actividades() { primario = false; CLS_CatDepartamento_Actividades sel = new CLS_CatDepartamento_Actividades(); sel.MtdSeleccionarDepartamento_Actividades(); if (sel.Exito) { int r; for (r = 0; r < sel.Datos.Rows.Count; r++) { if (sel.Datos.Rows[r][0].ToString() != string.Empty || sel.Datos.Rows[r][2].ToString().Trim().Length == 0) { primario = true; agregarNodo(sel.Datos.Rows[r][1].ToString() + " - " + sel.Datos.Rows[r][3].ToString()); Lc_codigo_dep.Add(sel.Datos.Rows[r][0].ToString()); Lv_nombre_dep.Add(sel.Datos.Rows[r][1].ToString()); Lc_codigo_act.Add(sel.Datos.Rows[r][2].ToString()); Lv_nombre_act.Add(sel.Datos.Rows[r][3].ToString()); Lc_actividad_padre.Add(sel.Datos.Rows[r][4].ToString()); } else { RecorrerTree(treeView1, sel.Datos, r); } } } }
private void CargarDepartamentos() { CLS_CatDepartamento_Actividades sel = new CLS_CatDepartamento_Actividades(); sel.MtdSeleccionarDepartamento_Actividades_Departamento(); if (sel.Exito) { lueDep.Properties.DisplayMember = "v_nombre_dep"; lueDep.Properties.ValueMember = "c_codigo_dep"; lueDep.EditValue = null; lueDep.Properties.DataSource = sel.Datos; } }
private void EliminarRegistro() { CLS_CatDepartamento_Actividades ins = new CLS_CatDepartamento_Actividades(); ins.c_codigo_act = txtId.Text; ins.c_codigo_dep = lueDep.EditValue.ToString(); ins.MtdEliminarDepartamento_Actividad(); if (ins.Exito) { LimpiarPantalla(); XtraMessageBox.Show("Se ha Eliminado el registro con exito"); } else { XtraMessageBox.Show(ins.Mensaje); } }