コード例 #1
0
        public GetInvoiceDetailsQM GetInvoiceDetails(string InvoiceNumber)
        {
            var response = new GetInvoiceDetailsQM();

            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new GetInvoiceDetailsSelectCommand {
                    Connection = connection
                };
                response = command.Execute(InvoiceNumber);
            }

            return(response);
        }
コード例 #2
0
        public GetInvoiceDetailsQM Execute(string InvoiceNumber)
        {
            var response = new GetInvoiceDetailsQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetInvoiceDetails]";
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add(AddParameter("@InvoiceNumber", SsDbType.NVarChar, ParameterDirection.Input, InvoiceNumber));

                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.GetSavedInvoiceDetailsList = reader.ToList <SavedInvoiceDetailsQMModel>();
                }
            }
            return(response);
        }