Ejemplo n.º 1
0
        public ActionResult GetMore1()
        {
            WorkmeetingBLL workmeetingbll = new WorkmeetingBLL();
            var            user           = OperatorProvider.Provider.Current();
            var            data           = workmeetingbll.GetOverView(user.DeptId);
            var            result         = data.Select(x => new WorkmeetingEntity()
            {
                MeetingId = x.FullName, MeetingPerson = ((decimal)x.Layer.Value / x.SortCode.Value).ToString("p")
            }).ToList();
            DataTable dt = new DataTable();

            dt.Columns.Add("Bz");
            dt.Columns.Add("Num");
            foreach (WorkmeetingEntity w in result)
            {
                DataRow row = dt.NewRow();
                row[0] = w.MeetingId;
                row[1] = w.MeetingPerson;
                dt.Rows.Add(row);
            }

            var JsonData = new
            {
                rows = dt
            };

            return(Content(JsonData.ToJson()));
        }