Beispiel #1
0
        public void BaoCaoDoanhSoPODetail(int id_phongban)
        {
            PO        pr = new PO();
            DataTable tb = pr.BaoCaoDoanhSoPODetail(id_phongban);
            var       js = new JavaScriptSerializer();

            List <Dictionary <string, object> > parentRow = new List <Dictionary <string, object> >();
            Dictionary <string, object>         childRow;

            foreach (DataRow row in tb.Rows)
            {
                childRow = new Dictionary <string, object>();
                foreach (DataColumn col in tb.Columns)
                {
                    childRow.Add(col.ColumnName, row[col]);
                }
                parentRow.Add(childRow);
            }

            Context.Response.Write(JsonConvert.SerializeObject(parentRow));
        }