标签:list blog inf .text roc class typeof query parameter
//存储过程的使用 PSContext _db = new PSContext(); _db.Database.CommandTimeout = 180; Type t = typeof(CompanyStaffInfoDTO); SqlParameter[] para = new SqlParameter[1]; para[0] = new SqlParameter("@sYear", textEdit1.Text.Trim()); var data = _db.Database.SqlQuery(t, "exec dbo.MyProc2 @sYear", para).Cast<CompanyStaffInfoDTO>().ToList(); this.gridControl1.DataSource = data;
标签:list blog inf .text roc class typeof query parameter
原文地址:http://www.cnblogs.com/tianhengblogs/p/6247522.html