public string EventLog()
        {
            EVENT_LOGTableAdapter adptEvent = new EVENT_LOGTableAdapter();
            DataTable             dt        = new DataTable();

            using (adptEvent)
            {
                dt = adptEvent.GetData();
            }

            string xml = "";

            using (StringWriter sw = new StringWriter())
            {
                dt.WriteXml(sw);
                xml = sw.ToString();
            }

            return(xml);
        }
        public ActionResult GetDownloads()
        {
            EVENT_LOGTableAdapter ta = new EVENT_LOGTableAdapter();
            DataTable             dt = new DataTable();
            DataSet ds = new DataSet();

            String[,] data = new String[3, 3];
            String x          = "";
            String jsonString = "[ ";


            try
            {
                //ds.Tables.Add(dt);
                dt = ta.GetData();
                for (int i = 0; i < 200; i++)
                {
                    x          = Convert.ToDateTime(dt.Rows[i]["Timestamp"]).ToString();
                    jsonString = String.Concat(jsonString, "{ ", '"', "Timestamp", '"', ": ", '"');
                    jsonString = String.Concat(jsonString, (dt.Rows[i]["Timestamp"] == null) ? "" : x, '"', ", ");

                    x          = dt.Rows[i]["Client_IP"].ToString();
                    jsonString = String.Concat(jsonString, '"', "Client_IP", '"', ": ", '"');
                    jsonString = String.Concat(jsonString, (dt.Rows[i]["Client_IP"] == null) ? "" : x, '"', ", ");

                    x          = dt.Rows[i]["Event"].ToString();
                    jsonString = String.Concat(jsonString, '"', "Event", '"', ": ", '"');
                    jsonString = String.Concat(jsonString, (dt.Rows[i]["Event"] == null) ? "" : x, '"', " }, ");
                }

                jsonString = jsonString.Substring(0, jsonString.Length - 2);
                jsonString = String.Concat(jsonString, " ]");
                return(Json(jsonString));
            }

            catch (Exception ex)
            {
                return(Json(ex.Message));
            }
        }