public static ArrayList GetFormListByName(string name) { DataSet ds = FormApprovalSrv.GetFormListByName(name); if (ds == null) { return(null); } ArrayList list = new ArrayList(); foreach (DataRow mDr in ds.Tables[0].Rows) { foreach (DataColumn mDc in ds.Tables[0].Columns) { list.Add(mDr[mDc].ToString()); } } return(list); }
public static ArrayList GetFormApprovalList() { DataSet ds = FormApprovalSrv.GetFormApprovalList(); if (ds == null || ds.Tables.Count == 0) { return(null); } //else // return ds.Tables[0]; ArrayList list = new ArrayList(); foreach (DataRow row in ds.Tables[0].Rows) { Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("valueField", row["Id"].ToString()); dict.Add("textField", row["FormName"].ToString()); dict.Add("ManageRange", row["ManageRange"].ToString()); list.Add(dict); } return(list); }