当前位置 主页 > 服务器问题 > Linux/apache问题 >

    Flex与.NET互操作(八) 使用FluorineFx网关实现远程访问(2)

    栏目:Linux/apache问题 时间:2019-12-01 23:11


    10         public Book GetBook()
    11         {
    12             return new Book
    13             {
    14                 Id = 1,
    15                 Name = "《三国演义》",
    16                 Author = "罗贯中",
    17                 Price = 100
    18             };
    19         }
    20 
    21         /// <summary>
    22         /// 返回DataTable对象
    23         /// </summary>
    24         /// <returns></returns>
    25         [DataTableType("Fluorine.ServiceLibrary.Book")]
    26         public DataTable GetDataTable()
    27         {
    28             DataTable dt = new DataTable("Book");
    29             dt.Columns.Add("Id", typeof(int));
    30             dt.Columns.Add("Name", typeof(string));
    31             dt.Columns.Add("Author", typeof(string));
    32             dt.Columns.Add("Price", typeof(double));
    33 
    34             DataRow dr = dt.NewRow();
    35             dr["Id"] = 1;
    36             dr["Name"] = "《三国演义》";
    37             dr["Author"] = "罗贯中";
    38             dr["Price"] = 52.30;
    39             dt.Rows.Add(dr);
    40 
    41             dr = dt.NewRow();