public GetGPReceivingResponseQM GetGPReceivingMasterAndDetails(Int64 VendorCode) { var model = new GetGPReceivingResponseQM(); using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new GetReceivingMasterAndDetailsSelectCommand { Connection = connection }; model = command.Execute(VendorCode); } return(model); }
public GetGPReceivingResponseQM Execute(long vendorCode) { var response = new GetGPReceivingResponseQM(); using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].[uspGetGPReceivingMasterAndDetails]"; sqlCommand.CommandType = CommandType.StoredProcedure; sqlCommand.Parameters.Add(AddParameter("@VendorCode", SsDbType.BigInt, ParameterDirection.Input, vendorCode)); using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand)) { response.getGPReceivingResponseModel = reader.ToList <GetGPReceivingResponseModel>(); } } return(response); }