Beispiel #1
0
        public string stockProcessList(string system_id)
        {
            clsDataHandling objDataClass = new clsDataHandling();
            DataTable       dt           = objDataClass.stockProcessList(system_id);
            StringBuilder   str          = new StringBuilder();

            str.Append("[");
            str.Append("{");
            str.Append("\"code\":\"0\" ,");
            str.Append("\"name\":\"--Select--\"");
            str.Append("},");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                str.Append("{");
                str.Append("\"code\":\"" + dt.Rows[i]["process_id"].ToString() + "\" ,");
                str.Append("\"name\":\"" + dt.Rows[i]["process_name"].ToString() + "\" ");
                str.Append("},");
            }
            str = str.Remove(str.Length - 1, 1);
            str.Append("]");
            return(str.ToString());
        }