private void Retrieve(int cod) { t07_restricao t07 = new t07_restricao(); { t07.t07_cd_restricao = cod; t07.Retrieve(); if (t07.Found) { lblds_restricao.Text = t07.ds_restricao; lblds_medida.Text = t07.ds_medida; lbldt_limite.Text = t07.dt_limite.ToShortDateString(); lbldt_cadastro.Text = t07.dt_cadastro.ToShortDateString(); t29_acaorestricao t29 = new t29_acaorestricao(); { t29.t07_cd_restricao = t07.t07_cd_restricao; t29.Retrieve(); if (t29.Found) { t08_acao t08 = new t08_acao(); { t08.t08_cd_acao = t29.t08_cd_acao; t08.Retrieve(); if (t08.Found) { trAcao.Visible = true; lblnm_acao.Text = t08.nm_acao; } } } else { trProjeto.Visible = true; } } } } }
private void Retrieve() { t07_restricao t07 = new t07_restricao(); { t07.t07_cd_restricao = Int32.Parse(cod.Value); t07.Retrieve(); if (t07.Found) { txtds_restricao.Text = t07.ds_restricao; txtds_medida.Text = t07.ds_medida; txtdt_limite.Text = t07.dt_limite.ToShortDateString(); ddlt08_cd_acao.ClearSelection(); t29_acaorestricao t29 = new t29_acaorestricao(); { t29.t07_cd_restricao = t07.t07_cd_restricao; t29.Retrieve(); if (t29.Found) { ListItem li = ddlt08_cd_acao.Items.FindByValue(t29.t08_cd_acao.ToString()); if (li != null) li.Selected = true; } else { cbProjeto.Checked = true; } } } } }