代码如下:
ProjectCompanyInfo companyinfo = new ProjectCompanyInfo(); DataTable dt=Helper.GetProjectCompnayInfo(); var Datas = (from t in dt.AsEnumerable() select new ProjectCompanyInfo{ //这里报指定的转换无效错误 CompanyId = Convert.ToInt32(t.Field<int>("CompanyId")), CompanyName = t.Field<string>("CompanyName"), IndustryType = t.Field<string>("IndustryType"), RepDate = t.Field<string>("RepDate"), RegCapital = t.Field<string>("RegCapital"), CompanyArea = t.Field<string>("CompanyArea"), RelocationAddress = t.Field<string>("RelocationAddress"), RegAdress = t.Field<string>("RegAdress"), LinkMan = t.Field<string>("LinkMan"), ContractPhone = t.Field<string>("ContractPhone"), CompanyIntroduction = t.Field<string>("CompanyIntroduction"), Year = t.Field<string>("Year"), ApplyState = Convert.ToInt32(t.Field<int>("ApplyState")), Nat_Org_Code = t.Field<string>("Nat_Org_Code") }).ToList();
oracle的number->c#的decimal
谢谢你,