| | |
| | | { |
| | | public class StatementBusiness |
| | | { |
| | | public Receive GetICS(int InspectObjectTypeId, int InspectTypeId, DateTime TimeBegin, DateTime TimeEnd, int PageIndex, int PageSize) |
| | | public Receive GetICS(int OrgId,int InspectObjectTypeId, int InspectTypeId, DateTime TimeBegin, DateTime TimeEnd, int PageIndex, int PageSize) |
| | | { |
| | | Receive receive = new Receive(); |
| | | try |
| | |
| | | using (DBContext db = new DBContext()) |
| | | { |
| | | System.Data.SqlClient.SqlParameter[] paramList = new System.Data.SqlClient.SqlParameter[] { |
| | | new System.Data.SqlClient.SqlParameter("@OrgId", OrgId), |
| | | new System.Data.SqlClient.SqlParameter("@IspectObjectTypeId", InspectObjectTypeId), |
| | | new System.Data.SqlClient.SqlParameter("@InspectTypeId", InspectTypeId), |
| | | new System.Data.SqlClient.SqlParameter("@TimeBegin", TimeBegin), |
| | |
| | | }; |
| | | int index = paramList.Length - 1; |
| | | paramList[index].Direction = ParameterDirection.Output; |
| | | List<EntityISC> list = db.Database.SqlQuery<EntityISC>("exec dbo.zp_GetICS @IspectObjectTypeId,@InspectTypeId,@TimeBegin,@TimeEnd,@pageIndex,@pageSize,@Total output ", paramList).ToList(); |
| | | List<EntityISC> list = db.Database.SqlQuery<EntityISC>("exec dbo.zp_GetICS @OrgId,@IspectObjectTypeId,@InspectTypeId,@TimeBegin,@TimeEnd,@pageIndex,@pageSize,@Total output ", paramList).ToList(); |
| | | receive.rows = list; |
| | | receive.total = int.Parse(paramList[index].Value.ToString()); |
| | | |