Exemplo n.º 1
0
    public TableData dataToJson()
    {
        TableData     td    = new TableData();
        List <Family> flist = FamilyBLL.GetAllList();

        td.count = flist.Count;
        List <Familyx> fx = new List <Familyx>();

        flist.ForEach((a) => { fx.Add(new Familyx()
            {
                CreateDate = a.CreateDate, FamilyType = a.FamilyType, HousingTypes = a.HousingTypes, Id = a.Id, ManageInstitutions = a.ManageInstitutions.ToString(), Name = a.Name, Old = a.Old, Owner = a.Owner, Remark = a.Remark, ResponsibleDoctor = a.ResponsibleDoctor, Total = a.Total
            }); });
        td.data = JsonConvert.SerializeObject(fx);
        return(td);
    }