01.
public
void
cmbDept(
int
pm_id)
02.
{
03.
ProgramDetailRepo prod =
new
ProgramDetailRepo();
04.
IEnumerable<ProgramDetail> prods = prod.GetDataProd(pm_id);
05.
int
p = prods.Count();
06.
if
(p > 0)
07.
{
08.
cbPdetail.DataSource = prods;
09.
[font=Verdana]cbPdetail.ValueMember =
"pd_id"
;
10.
cbPdetail.DisplayMember =
"pd_name"
;[/font]
11.
12.
riskpd = cbPdetail.SelectedValue.ToString();
13.
}
14.
else
15.
{
16.
cbPdetail.DataSource =
null
;
17.
if
(cbPdetail.DataSource ==
null
)
18.
{
19.
riskpd =
" "
;
20.
}
21.
22.
}
23.
}