or
Profile |
Test |
Sample |
Prepared Sample |
Container |
Blood Group |
Blood Group |
|
Serum |
Plain Tube |
Rh Type |
||||
CBCESR |
Hb |
|||
RBC |
||||
PCV |
||||
MCV |
||||
MCH |
||||
MCHC |
var sortedByLft = from c in network | |
where (c.Rgt - c.Lft) == 1 | |
orderby c.Name ascending | |
select c; | |
var checkNetwork = new List<Network>(); | |
//display the unique items in the gridview | |
foreach (var item in sortedByLft) | |
{ | |
Application.DoEvents(); | |
//check if item is already added | |
var check = checkNetwork.Find(p => p.Adserver_id == item.Adserver_id); | |
if (check != null) continue; | |
checkNetwork.Add(item); | |
Application.DoEvents(); | |
rgvAdlPositions.MasterGridViewTemplate.Rows.Add(new object[] { item.Adserver_id, item.Name }); | |
var template = rgvAdlPositions.MasterGridViewTemplate.ChildGridViewTemplates[0]; | |
foreach(var position in item.Positions) | |
{ | |
Application.DoEvents(); | |
//get the method as string | |
var method = Enums.GetMethod(position.Method); | |
//add to row | |
template.Rows.Add(new object[] | |
{ | |
item.Adserver_id, position.PosId, | |
ownFunctions.ConcatStrings(new List<string> | |
{ | |
position.Name, | |
position.Width.ToString(), | |
"x", | |
position.Height.ToString() | |
}), | |
method | |
}); | |
var templateAd = template.ChildGridViewTemplates[0]; | |
foreach(var adPos in position.adserverPositions) | |
{ | |
//add adserved position to row | |
templateAd.Rows.Add(new object[] { item.Adserver_id, position.PosId, adPos.name }); | |
} | |
} | |
} |