private void form_cargar_datos(String posicion) { try { var BL = new tb_60grupoBL(); var BE = new tb_60grupo(); var dt = new DataTable(); BE.moduloid = moduloiddes.SelectedValue.ToString(); if (moduloiddes.SelectedValue.ToString() == "0000") { MessageBox.Show("Seleccione Almacen", "Information"); return; } if (grupoid.Text.Trim().Length > 0) { BE.grupoid = grupoid.Text.Trim().PadLeft(4, '0'); } BE.posicion = posicion.Trim(); dt = BL.GetAll_paginacion(EmpresaID, BE).Tables[0]; if (dt.Rows.Count > 0) { limpiar_documento(); ssModo = "EDIT"; grupoid.Text = dt.Rows[0]["grupoid"].ToString().Trim(); gruponame.Text = dt.Rows[0]["gruponame"].ToString().Trim(); ctacte.Text = dt.Rows[0]["ctacte"].ToString().Trim(); ctactename.Text = dt.Rows[0]["ctactename"].ToString().Trim(); btn_editar.Enabled = true; btn_eliminar.Enabled = true; btn_imprimir.Enabled = true; btn_primero.Enabled = true; btn_anterior.Enabled = true; btn_siguiente.Enabled = true; btn_ultimo.Enabled = true; btn_log.Enabled = true; btn_salir.Enabled = true; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }