public ActionResult Pending_CashDisbursement() { ViewData["listPA"] = GetPA(); ViewData["listPSA"] = GetPSA(); return View(); } public SelectList GetPA() { cmn_top objCmn_top = new cmn_top(); DataTable Dt_item = new DataTable(); Dt_item = objCmn_top.Reports_GetPA_CD_Cash_(); var collection = from dtRow in Dt_item.AsEnumerable() select new { Text = dtRow.Field<string>("ch_pacode"), Value = dtRow.Field<string>("ch_pacode") }; var listPA = new SelectList(collection, "value", "text"); return listPA; } public SelectList GetPSA() { cmn_top objCmn_top = new cmn_top(); DataTable Dt_item = new DataTable(); Dt_item = objCmn_top.Reports_GetPSA_CD_Cash_("L01"); var collection = from dtRow in Dt_item.AsEnumerable() select new { Text = dtRow.Field<string>("PSATXT"), Value = dtRow.Field<string>("PSATXT") }; var listPSA = new SelectList(collection, "value", "text"); return listPSA; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)