1
I have three classes:
class Cid
{
public string cid { get; set; } //importo esse campo via txt
public string descricao { get; set; } //importo esse campo via txt
}
class Relacionamento
{
public string cid { get; set; } //importo esse campo via txt
public string codigo { get; set; } //importo esse campo via txt
public string procedimento { get; set; } //PRECISO DESSE CAMPO
}
class Procedimento
{
public string codigo { get; set; } //importo esse campo via txt
public string procedimento { get; set; } //importo esse campo via txt
}
I created a list for the classes: listaCid
to the classe Cid
, and listaProcedimento
to the classe Procedimento
After the created classes, the user clicks on an listaCid
.
After clicking, the listaRelacionamento
is filtered using Where Cid.cid = Relacionamento.Cid
. So far so good.
I want to know how to include in listaRelacionamento
(after the filter), the field Relacionamento.procedimento
from listaProcedimento
From the image, you can see: The user clicks on the top grid that receives the Cid list (in this case, received the A013 code) and switches to the bottom grid.Link (see that filters all fields where Cid = A013), but the third column is empty.
I want to fill the third column of the listRelationment by blue painted field (procedure)
Try to put also the procedure you say you are doing. It is very confusing what you intend to do. By the way, do not use the tag
visual-studio
if the problem is unrelated to the IDE. Read tip: What is a programming language, IDE and compiler?– Jéf Bueno
I’ll change the question
– Italo Rodrigo
Are all these classes collections? Come from where these collections?
– novic
I don’t know if they are collections. I created the classes as I showed in the code, by hand. and import the data from a txt file.
– Italo Rodrigo
I don’t quite understand the class
Relacionamento
, what is the purpose of the fieldcodigo
andprocedimento
of this class?– gato
It wouldn’t be easier just to create the fields
codcid
andcodprocedimento
in classRelacionamento
? But anyway, this confusing your question, I suggest you be more specific and make it easy for us here.– gato
The purpose of the relationship table is to join the Cid tables and procedure
– Italo Rodrigo
the issue is that txt files with this information comes ready. it might even be easier to do the way you said above, but anyway I would have to put the files together to create the new fields in the Relationship class.
– Italo Rodrigo