必须先绑定数据源,然后才能执行此操作

时间:2016-06-14 14:45:09

标签: c# asp.net-mvc asp.net-mvc-4

我正在尝试将网格视图转换为PDF,选择每个ID的行 这是我得到的错误

enter image description here

这里是我模型中的代码

    public void Configure(IApplicationBuilder app)
    {
        app.UseDefaultFiles();
        app.UseStaticFiles();
        //app.Run(async (context) =>
        //{
        //    await context.Response.WriteAsync("Hello World!");
        //});
    }

这是我控制器中的代码。

namespace Clinlab.Web.Models {
    public class RequisitionModels {

        public int ReqId { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string AccountNo { get; set; }
        public string AccountDate { get; set; }
        public string Address { get; set; }
        public string City { get; set; }
        public string State { get; set; }
        public string Zip { get; set; }
        public string INSCD1 { get; set; }
        public string INSINO1 { get; set; }
        public string PhoneNo { get; set; }
        public string FaxNo { get; set; }
        public string DocNo { get; set; }

    }
}

0 个答案:

没有答案