public static List <SelectListItem> GetPayId(string PayCompany) { List <SelectListItem> list = new List <SelectListItem>(); DataTable dt = MandateInfoPro.GetPayId(PayCompany); if (dt == null) { return(list); } SelectListItem SelListItem = new SelectListItem(); SelListItem.Value = ""; SelListItem.Text = "请选择"; list.Add(SelListItem); for (int i = 0; i < dt.Rows.Count; i++) { SelListItem = new SelectListItem(); SelListItem.Value = dt.Rows[i][0].ToString(); SelListItem.Text = dt.Rows[i][0].ToString(); list.Add(SelListItem); } return(list); }
public static string GetPayId() { return(MandateInfoPro.GetPayId()); }